2 Replies Latest reply on Jan 6, 2014 7:05 AM by philmodjunk

    Using the Field Length to determine the field width?

    CarlFritsche

      Title

      Using the Field Length to determine the field width?

      Post

           I currently use FileMaker Pro 12.0 V4. I am wanting to know if there is some way to determine the width of a field on a layout used for printing by determining the maximum length of a value used for that field?

           On the layout I use the Verdana 6pt font

           I have made 2 fields:

           Field Length = Length (Color)

           Largest Field Length = Maximum of Field Length

            

           I know I can't have it set it each time, but I could allow for the longest possible field value without it being clipped.

            

           Is it possible to determine how wide I need to make the Color field?

            

           Thanks,

           Carl

        • 1. Re: Using the Field Length to determine the field width?
          SteveMartino

               Hard to understand exactly what you are describing without a screenshot.  Can you use a merge field, and/or sliding left, sliding up options?

          • 2. Re: Using the Field Length to determine the field width?
            philmodjunk

                 You have two problems:

                   
            1.           You can't dynamically specify the width of a field in FileMaker
            2.      
            3.           Length counts characters and that won't tell you the width that you need since different characters have different widths. Compare these two 5 character strings: iiiii WWWWW.


                 What you can do, in some circumstances, is to either make the field wider than you ever expect to need and set it to "slide left". This change is only visible when you print, PDF or preview the layout. Or you can insert it into a layout as merge text and then the field can expand as needed out to the width of the text object into which you inserted the merge field.

                 Key facts about sliding layout objects:

                   
            1.           It's only visible in preview mode and when you print/save as PDF...
            2.      
            3.           Sliding fields will shrink but not expand.
            4.      
            5.           All layout objects below and in the same layout part as the slide/resize field need to also be set to slide up and resize.
            6.      
            7.           Objects in headers and footers will not slide.
            8.      
            9.           Portals will shrink/slide to fit the number of rows of records, but fields within the portal row will not shrink/slide.
            10.      
            11.           Fields will slide up only if Top alignment is specified for it and will slide left only if Left alignment is specified.
            12.      
            13.           Consistent side borders are difficult to achieve with sliding fields.
            14.      
            15.           In FMP13, hidden objects (”Hide object when”) will slide/resize.