7 Replies Latest reply on May 23, 2014 8:12 AM by sai

    Get ( ActiveLayoutObjectName )



      Get ( ActiveLayoutObjectName )


           I've looked at all the posts on this subject and the "work around" seems to be to specify a button's object name as a script parameter.  However, no one has addressed the fact that the Get(ActiveLayoutObjectName) function doesn't work!  FileMaker's example is what I and many of you are trying to accomplish when pressing a button.  Can someone from FileMaker Comment on this function.  If it is not a bug than the documentation and example must be changed.

        • 1. Re: Get ( ActiveLayoutObjectName )

               It does indeed work as it was designed to work. You are assuming that clicking a button makes it the active layout object. This is not the case and if it was the case, many layout designs would fail to work correctly.


               Say you have a text field with edit buttons intended to modify text either selected or at the insertion point marked by the cursor. If clicking a button made it the active layout object, the text field would lose that focus (selected text and or cursor position) and the scripts performed by those buttons would fail to work as intended.

          • 2. Re: Get ( ActiveLayoutObjectName )

                 Then the online documentation should be updated to say what you just said.

            • 3. Re: Get ( ActiveLayoutObjectName )

                   That would be an Issue to take up with someone that actually works for FileMaker Inc. wink

                   You could post to Feedback or use Report an Issue to report this as a "documentation bug" if you wish.

                   But when I check the documentation in FileMaker Help, if find that it states:






                        Returns the object name of the active layout object in the calculation's current window; otherwise, returns an empty string.

                   That would seem a fully accurate description of what the function does. I haven't found an entry that says clicking a button makes it an active layout object--which would definitely need correcting if such exists.

                   You can, BTW,  make the button an active layout object by using Go to Object in a script or by pressing tab if the button is the next object in the tab order--just not by clicking it.

              • 4. Re: Get ( ActiveLayoutObjectName )

                     But here's where it get confusing. Filemaker help goes on to say::

                     There is a named button on the current layout called cancelButton. When the focus is on the button, Get(ActiveLayoutObjectName) returns cancelButton.

                • 5. Re: Get ( ActiveLayoutObjectName )

                       And that's completely correct. You just can't click the button to put the focus on it. You'd press tab/return/enter to move the focus to the button and then only if the button object is in the tab order. Or a script can put the focus on the button with Go to Object.

                       But I agree that using a button object in the example without further explanation is just asking for confusion on the part of new users who read that help article.

                       I happen to have a link to someone responsible for the online help and can drop them a line pointing out this source of confusion.

                  • 6. Re: Get ( ActiveLayoutObjectName )

                         The person I emailed, agrees that this issue needs to be modified in future releases and has logged it accordingly.

                    • 7. Re: Get ( ActiveLayoutObjectName )


                           Thanks for your help.  You have shed new light on this topic that is greatly appreciated.