2 Replies Latest reply on Jul 16, 2015 8:30 AM by disabled_ntaylor

    Script Trigger not as expected



      Script Trigger not as expected


      FileMaker Pro



      Operating system version


      Description of the issue

      The "On Object Enter" Script Trigger does not work if the field it is set to, is a Pop Up Menu.  When you click on the pop up menu /or in the field where the pop up menu is, nothing happens.  It only gets triggered when the value in the pop up menu gets changed.

      It works fine if the field is changed to a drop down list or a drop down calendar.

      Steps to reproduce the problem

      Self explanatory in Description

        • 1. Re: Script Trigger not as expected

          This is a known issue that has been with us since script triggers were added (If I remember correctly).

          One trick to work around this is that if your script needs the value of the field before a value was selected from the popup menu, you can pass that value to your trigger performed script in the script parameter. You can use this to check the "before" value or to reset the field back to it if such is needed.

          For More Information see:     Popup-Menu Fails to allow on Enter trigger to grab Field Value Prior to Modification

          This is one of many acknowledged bugs that can be found in the Known Bug List thread here in the Report an Issue section of the forum.

          It can also be downloaded as a database file from:    https://www.dropbox.com/s/jt09b82i0xijbu3/FMP%20Bugs.zip

          • 2. Re: Script Trigger not as expected

            Mark Banin:


            Thank you for the post. 


            PhilModJunk is correct (thank you!). We are aware of this behavior. This is now documented in FileMaker Pro 14 Help under Setting up a field to display a pop-up menu, checkbox set, or other control.


            In the Notes section, it says:


            "Pop-up menus activate the OnRecordLoad and OnOjbectEnter script triggers differently from drop-down lists and calendars:


            For pop-up menus, clicking the field displays the pop-up menu first. These triggers are activated only after you select a value in the pop-up menu. However, if you press Tab or use a script to enter the field, these triggers are activated first; then you can click the field to select a value. If your script needs to access the value of the field before the user changes it, pass the value of the field into your script as a parameter. In your script, use the Get(ScriptParameter) function to get the field's value before the user clicked the field.


            For drop-down lists and calendars, entering the field by any method (clicking the field, pressing Tab, or running a script) activates these triggers first. After the script runs, you can enter or select a value."


            Additionally, I added your comments to the original report made to Testing and Development.



            FileMaker, Inc.