A READER ASKS
I am a rank amateur in these matters, so I turn to you for help with this problem. When creating a report that uses most of the width of a legal sized paper, I find that the actual contents of fields do not necessarily fill the design width of the field. For example, the field length of a name field might have been created as, say, 20 characters while the longest name in the database actually is 14. Because of the need to find as much space as possible, I would like to extract from each of the critical fields the longest names (street names, city names, etc.). One method might be to find all names >= 14, say. I have looked and looked, but cannot determine how this could be done. Can you help? It would be greatly appreciated.
Well, there is a lot of things you could do with this but all of them are going to center around the Length function. The Length function returns the number of characters in a field or text string including numbers, special characters and even spaces. Length is often used for validation ( data is at least x number of characters long ).
So I decided to cook up a quick example. I actually duplicated an example and put it into another tab. So this is a Example Double Header of all things. Here I created a calculation field to know the length of my two key fields. Then I used the Max function to know the top number of characters in those fields.
Here you can see a portal of song names and the artist that they are associated with. Next to the fields, we calculate the number of text characters within that field for that record. At the bottom of the portal, we use the Max function to know the maximum number of characters used in a field for the file.
An example file can be downloaded at ...
More info about the author and FileMaker in general, contact me at email@example.com.
© 2008 - Dwayne Wright - dwaynewright.com
The material on this document is offered AS IS. There is NO REPRESENTATION OR WARRANTY, expressed or implied, nor does any other contributor to this document. WARRANTIES OF MERCHANT ABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED. Consequential and incidental damages are expressly excluded. FileMaker Pro is the registered trademark of FileMaker Inc.
====================== ADVERTISEMENT ==============================
For more information on the Virtual One On One Training, please visit http://www.dwaynewright.com/training.html