I am trying to get a calculation field to show whether or not any row has been selected in a portal named "Client List Portal." I am not getting the result I believe I should be getting.
According to FileMaker Pro Advanced 12 Help, regarding the GetLayoutObjectAttribute function, …
hasFocus- returns 1 (True) if objectName is currently active, otherwise returns 0 (False). Objects that can have the focus are fields, portals, tab panels, charts, and groups. Also returns 1 for a portal when a portal row is selected.
(Please note underlined text) However, a calculation field with its Options set thus…
GetLayoutObjectAttribute ( "Client List Portal" ; "hasFocus" )
… always yields 0, even if portal rows are selected. This problem persists no matter whether a (populated) portal row is selected by…
…and also persists whether the calculation result type is set for Text or Number.
To check that I have specified the object properly, I replaced the attributeName parameter with other values and saw correct results. For example, replacing the "hasFocus" attributeName with "objectName" yielded "portal" (as documented).
Also, entering this function in the Data Viewer window (in exactly the same format -- and clicking the refresh button) yields the proper result.
What might I be doing wrong here?
Thank you for your help with this problem.
One issue with these types of Calculations is that the Calculating Field needs to be set to "Unstored"... This may help.