9 Replies Latest reply on May 19, 2010 6:31 AM by caskew

    Setting Limit on Number of lines in a field or Stopping a field from expanding

    Figaro2

      Title

      Setting Limit on Number of lines in a field or Stopping a field from expanding

      Post

      Is there any way to set a limit on the number of lines that may be entered into a field in FMP v5? 

      and/or

      Is there any way to keep a field from expanding in FMP 5?

       

      I am trying to limit the size of a field.  I have limited the size by restricting the word count but it's not ideal.

        • 1. Re: Setting Limit on Number of lines in a field or Stopping a field from expanding
          TSGal

          Figaro2:

           

          Thank you for your post.

           

          I am trying to find a copy of FileMaker Pro 5, but not having much luck.  I did find FileMaker Pro 6, so I'm hoping what I have is close to version 5.

           

          In FileMaker Pro 6, I can go into Layout Mode (View menu), select the text field, pull down the Format menu and select "Field Format..."  I have the option checked for Standard field, and I have a checkbox below that to "Include vertical scroll bar".  What this keeps a field a static height, and if too many lines are entered, the scroll bar becomes active.

           

          I know you are using word count to restrict the size, so in the back of my mind, I'm thinking "content size" versus "physical size".  You can also use the Length () function to limit the "content size".

           

          I hope this information helps.

           

          TSGal

          FileMaker, Inc. 

          • 2. Re: Setting Limit on Number of lines in a field or Stopping a field from expanding
            Figaro2
              

            Thanks for the ideas.  Setting the field format to scroll does limit the physical size displayed. The length function helps in controlling the content size.  The length function does not account for carriage returns.  I am trying to limit the entry to a fixed number of lines that will displayed when printed. Any other thoughts?

            • 3. Re: Setting Limit on Number of lines in a field or Stopping a field from expanding
              TSGal

              Figaro2:

               

              A couple of thoughts here....

               

              You can determine the number of returns in a field using the PatternCount () function.  That will limit you to the number of returns.  However, with automatic wrap-around, a return will not be picked up.  You could have four lines of one character each, and the PatternCount () function returns 3 while the Length () function returns 7.  However, you could have one long line that stretches across four lines on the field, and the PatternCount () function returns 0 while the Length () function returns 300 (or more).

               

              In other words, I don't know of a way to limit the display to a set amount of lines.  You can probably come close using a combination of the two.

               

              TSGal

              FileMaker, Inc.

              • 5. Re: Setting Limit on Number of lines in a field or Stopping a field from expanding
                Kundinger
                  

                Hi "Figaro2",
                 
                Printing text fields with a lot of data may cause the printed record to NOT fit properly on one page.  This results in 'cut-off' text at the bottom of one page and top of the next page.  This is a compound issue, because every FMP file will utilize different printers, fonts, etc.  How do you get the page breaks to function properly???  This is the question?
                 
                This has been an issue since I started using FileMaker in 1987... version 2.  FileMaker, Claris, etc. have never been able to develop a solution for this.  To me, it should be simple for FMI to implement a text block that would recognize the page break and wrap the text appropriately.  This is standard functionality in word processors.  It is also common for page/web layout apps to see objects and wrap the text appropriately.
                 
                 
                •••  One thing to understand...  FMP is NOT a word processor, use a word processor to write letters for printing!!!
                 
                 
                As for work-a-rounds...  there have been many attempts over the years with none being the ultimate solution.  I've seen...
                 
                  - use fixed width characters using total character calcs to move portions of data to different fields
                  - use a single line field for each line of text
                  - etc., etc., etc. 
                 
                 
                The following is the most usable solution I've found and I use for my client solutions.  Because FMP does data and word processors do letters, use them together... 
                 
                   - I have "data entry" layouts where users enter data in the necessary fields
                   - I have a hidden layout with one field "complete_data"
                        - this field has all the data 'merged' into it like a word processor 
                        - this field has the proper text formating...  fonts, styles, sizes, etc.
                   - I create a script that takes the contents of "complete_data" field and pastes it into a word processor
                        - I use the the workstations native OS's scripting abilities to open the word processor and paste the data 
                        - you can then let the user print this document
                 
                   OPTIONS...
                  
                   - When you paste the data into the word processor, the user can then add/edit the main content before printing
                   - Allow the user to save these documents...  they're word processing documents!!!
                   - Link these saved documents back to FMP as an external link...  NOW you have "Document Management"!!!
                 
                 
                I hope this helps you and any other interested readers... Good Luck!!!

                Kundinger
                    

                • 6. Re: Setting Limit on Number of lines in a field or Stopping a field from expanding
                  Figaro2
                     Sounds like Filemaker needs to work on a better solution.  I'll have to try your method. Thanks for sharing your creative solution.
                  • 7. Re: Setting Limit on Number of lines in a field or Stopping a field from expanding
                    braxton

                    Anything new on this?  I am using FM 9.  When someone fills a text box with too many lines I would like to prevent that and pop up a message letting them know they are at their limit of lines in the field.

                    • 8. Re: Setting Limit on Number of lines in a field or Stopping a field from expanding
                      mrvodka

                      Not really. You still can limit the number of characters. If your text box uses a monspaced font, you probably can figure out the maximum number of characters for it to fit in the text box display.

                      • 9. Re: Setting Limit on Number of lines in a field or Stopping a field from expanding
                        caskew

                        Is there any new info on this topic?

                         

                        Even if you limit the number of characters, it does not stop how many lines they have.  You could limit to 20 characters but still have 5 lines.

                         

                        How do you say:

                        Limit to two lines of text , no matter how many characters and hard returns?