Scripting Get (Active...) Functions
I am having considerable frustration with scripting Get(Active...) functions using FM12 Pro: I have a single layout with one text field that activates as a button and performs the following simple script:
I turn on Script Debugger and Data Viewer: Then I mouse the text field and step through the script, the Data Viewer shows no values returned by any of the four Get() functions no matter what is entered in the text box. Could someone please tell me what I am doing wrong? Is this similar to the functions that do not work if you have a "." in the file name or the GetField () will not work with any calculation using Get(LayoutName) – must be Get(LayoutTableName)?
I suspect that your script is executed while the Button has focus and not the intended Field unless you have a Go to Object (or Field) script step in front of the Set Variable[…] steps. Try setting a field script trigger (e.g. OnObjectEnter or OnObjectExit) instead of the button.