Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Dynamic Field Width

Featured Replies

  • Newbies

Relatively new to FM, but here's quick question:

 

Is there a way to calculate the maximum length of all data for a particular field? For example, I have many layouts that contain concatenated fields for text (usually an address), and it feels like the width of the field is much too large for the data within in. 

 

I could always export all my data to Excel, use the LEN function and go about it that way, it feels like there should be a simpler solution.

 

Any ideas would be very appreciated.

 

 

Hi Dub, and welcome to the Forum,

 

I moved your topic from "Articles, Tips, Techniques & Solutions" to "Calculation Engine (Define Fields)” because the Articles, Tips, Techniques & Solutions topic is reserved for the Members to post these solutions, not for asking How-To questions.

 

Check out the Length Function and see that helps.  Link to that function

With a text limit of 1 billion character I think you are safe.   :yep: 

From a practical point of view, you could put a calc field to get the length of the field on a list layout to get an idea of what you have.

Length of text and width of field are two separate things. Not sure what is the question here.

If you use non-proportional font, it'll be easier; courier on Windows or if Mac, Andale Mono.  There are others as well but you would want a font which is standard on both platforms or else you will need to use conditional formatting to change the field-attributes at the layout level to adjust from one font to the other depending upon platform.

 

But non-proportional makes it easy to count characters depending upon width.  You can count the width of your longest address field (or the concatenated length of city/state/zip and use that as your max characters number.  

 

Still ... FMI has not seen fit to help us out on this regard.  I recall 15 years ago a simple Labels program for making badges which would turn characters red as you typed them and let you decrease the size per record.  It was great at things such as this.  Alas, not so easy or precise with FM.  Word-wrap is what it is.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.