4 Replies Latest reply on Mar 14, 2012 9:26 AM by philmodjunk

    Not quite sure what to do



      Not quite sure what to do


      Hey guys,


      I'm not quite sure what proccess is available to help me with this situation.  I've been writing catalog descriptions for the products the company I work fors new webstore.  Come to find out after 3 months of work, there is a max char count of 240.  The filemaker file I am using is just to keep track of where I'm at with the project and where I write the descriptions, so I can export them out as .XLS inorder to be uploaded to the webstore software.  Anyway, What I'd like to do, is somehow write a script, or build a function somehow that would search through the long_catalogue_description_text and if it exceeds the 240 char count that I cannot exceed for the webstore, it chops off anything over the 240 chars and enough text more at the end to put ", and more."  

        • 1. Re: Not quite sure what to do

          If you want to permanently change the text, take a look at using the replace field contents tool while using a calculaiton such as:

          Let ( [ t = yourfieldHere ;
                    L = Length ( t )
                 If ( L < 241 ; t ; Left ( t ; Position ( t ; " " ; 240 ; - 1 ) ) & ", and more." )

          I'm using the position tool to break off the existing text at the first space to the left of the 240th character to avoid having a partial word at the end of this text.

          If you want to keep the original text unchanged, (I think this is a better idea). Use the above expression in a calculaition field set to return text. This would allow you to perform a find on the calculation field for "and more" and then you could inspect and adjust the wording of all descriptions that exceeded the limit.

          • 2. Re: Not quite sure what to do

            That works PERFECT Phil.  Thank you once again.  I'll tell you, I'm keeping this website software company on their toes, they have had to make quite a few fixes and updates since I started working here finding little glitches in the system, and a simple max char count in their training literature and user guides to prevent someone from waisting company time going over it. 

            • 3. Re: Not quite sure what to do

              Just to let anyone else know that may look at this, I did have to drop the 240 in the calculation down to 229 to allow for the 11 chars of the ", and more".  

              • 4. Re: Not quite sure what to do

                Since I'm not an employee of FileMaker Inc, we're not wasting company time. Since I enjoy helping others, I don't see my time as wasted either.

                There is a validation setting in field options you can add to limit input to a specified number of characters.