Newbies dubczech Posted March 14, 2014 Newbies Posted March 14, 2014 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.
Lee Smith Posted March 14, 2014 Posted March 14, 2014 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
TKnTexas Posted March 16, 2014 Posted March 16, 2014 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.
comment Posted March 16, 2014 Posted March 16, 2014 Length of text and width of field are two separate things. Not sure what is the question here.
LaRetta Posted March 16, 2014 Posted March 16, 2014 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.
Recommended Posts
This topic is 3962 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now