The FileMaker FieldBounds Function

From Dwayne Wright PMP, PMI-ACP, CSM
Certified FileMaker Developer

WEB: www.dwaynewright.com
EMAIL: info@dwaynewright.com
TWITTER: dwaynewright
YOUTUBE: FileMakerThoughts

FieldBounds
FieldBounds( fileName ; layoutName ; fieldName)
All Current Versions Of FileMaker
Returns A Text Result

The FieldBounds function will give you the position of a field (in pixels) associated to a defined layout and the rotation of the field (in degrees) as it appears on a defined layout. This function has three defined parameters, which are: what database, what layout, and what field do you want to get the field bounds for? Since the parameters of the function are looking for object or location information, you need to add quotation marks around the values you place as its parameters.

For example: FieldBounds("Clients.FP7", "Form", "Comments") in a database returns 456 356 805 660 0. Which is to say that the field Comments in the file called Clients.FP7 on the layout called Form is exactly 456 pixels left of the corner of the layout, 356 down from the top of the layout, 805 pixels from the right corner of the layout, 660 pixels from the bottom of the layout and the field is not rotated.

As you can see in the above example, the values that are returned by the FieldBounds function are space delimited. That is to say a space character separates them and that does allow you to use some of the text functions to parse this data out.

© 2010 - Dwayne Wright - dwaynewright.com
The material on this document is offered AS IS. FileMaker Pro is the registered trademark of FileMaker Inc.