Go to Contents
Previous
Page
Next
Page
Contents > Functions reference (alphabetical list) > Logical functions > GetLayoutObjectAttribute function

GetLayoutObjectAttribute function
Format

GetLayoutObjectAttribute(objectName;attributeName{;repetitionNumber; portalRowNumber})
Parameters
objectName - the name of a named layout object on the current layout
attributeName - the name of a supported attribute (see below)
repetitionNumber - the repetition number (for repeating fields)
portalRowNumber - the number of the row in the portal
Parameters in curly braces {} are optional.
Data type returned
text
Description
Returns the specified attributes of the layout object given by objectName that is currently active in the calculation.
Attributes:
objectType - returns the object's type as a text literal, in English. Valid return values are: field, text, graphic, line, rectangle, rounded rectangle, oval, group, button group, portal, tab panel, web viewer, and unknown.
hasFocus - returns 1 (True) if objectName is currently active, otherwise returns 0 (False). Objects that can have the focus are fields, portals, tab panels, and groups. Also returns 1 for a portal when a portal row is selected.
containsFocus - returns 1 (True) if objectName is currently active or if it contains an active object; otherwise returns 0 (False). Objects that can contain the focus are fields, portals, tab panels, and groups.
isFrontTabPanel - returns 1 (True) if the target object is the tab panel that is in front.
The following object coordinates are given in pixels relative to the bottom-left corner of the FileMaker menu bar.
bounds - returns a list of numeric values, separated by spaces, that describes the placement of the specified object (left-top to right-bottom).
left - returns the left edge coordinate of the specified object.
right - returns the right edge coordinate of the specified object.
top - returns the top edge coordinate of the specified object.
bottom - returns the bottom edge coordinate of the specified object.
width - returns a number representing the width (in pixels) of the specified object.
height - returns a number representing the height (in pixels) of the specified object.
rotation - returns a number representing the rotation (in degrees) of the specified object.
startPoint,endPoint - returns a pair of numeric values (horizontal vertical), separated by spaces, that represent the start point or end point of a line object. Other objects will return the top left point for startPoint and the bottom right point for endPoint.
source - returns the source description of the specified object as follows. For:
web viewers - returns current URL
fields - returns the fully qualified field name (table name::field name)
text objects - returns the text (does not return merge fields)
portals - returns the related table name
graphics - returns image data such as Container data type
For all other objects, returns an empty string.
content - returns the content of the specified object as follows. For:
web viewers - returns the current content (such as HTML code)
fields - returns the field data formatted using the specified object's properties
text objects - returns the text (including text from merge fields)
graphics - returns image data such as Container data type
For all other objects, returns an empty string.
enclosingObject - returns objectName of the enclosing layout object. Otherwise, returns an empty string. Only groups, tab panels, and portals can contain other objects.
containedObjects - returns a list of named objects contained within objectName. Only groups, tab panels, and portals can contain other objects.
Notes
If objects are set to auto-resize, attributes returned are based on the resized bounds of the object in its current state.
If objects are located above the tool bar or to the left of the status area, negative coordinate values are returned.
The hasFocus, containsFocus, source, and content attributes behave differently in Instant Web Publishing. For more information, see the FileMaker Instant Web Publishing Guide, which is located in the folder where FileMaker Pro is installed.
Examples
GetLayoutObjectAttribute("CancelButton","objectType") returns group (if the button does not have an action or script associated with it) or returns button group (if the button has an action or script associated with it).
GetLayoutObjectAttribute("CancelButton","bounds") returns 138 24 391 38 0
Related topics
Functions reference (category list)
Functions reference (alphabetical list)
About formulas
About functions
Defining calculation fields
Using operators in formulas
Naming objects

Contents > Functions reference (alphabetical list) > Logical functions > GetLayoutObjectAttribute function
Previous
Page
Next
Page