March 14, 201411 yr 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.
March 14, 201411 yr 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
March 16, 201411 yr With a text limit of 1 billion character I think you are safe. 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.
March 16, 201411 yr Length of text and width of field are two separate things. Not sure what is the question here.
March 16, 201411 yr 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