3 Replies Latest reply on Sep 5, 2012 11:07 PM by alanfair

    New Record Event - Trigger Script

    alanfair

      Title

      New Record Event - Trigger Script

      Post

      Is it possible to set a trigger on a layout to run a script when a new record is created. I want to assign certain values to fields, when a record is first created, prior to any commit.

      I know I can do this by say created my own "New Record" button and assigning a script to it, to assign the values.

      However I wondered if there was an event associated with a layout for this. (Cant find one), so it always happens, and I dont need my own button.

       

      Thanks

        • 1. Re: New Record Event - Trigger Script
          schamblee

          Each field has Auto-Enter feature.  You can use a Caluculated value, data, value from list, serial number, modification field, creation field. For the data just check the data check box and enter any default information in the default data box. 

          • 2. Re: New Record Event - Trigger Script
            philmodjunk

            There is no "new record" script trigger in current versions of FileMaker.

            For setting initial values in fields, as S Chamblee has indicated, you don't need a script, you can use auto-enter field options to set these values in each newly created record.

            For more sophisticated manipulation of a new record, you can use FileMaker Advanced to write your own New Record script and set up the layout's custom menu to perform this script instead of the standard New Record menu option--this subsitutes your script for both selections from the Records Menu and also its keyboard shortcut.

            1 of 1 people found this helpful
            • 3. Re: New Record Event - Trigger Script
              alanfair

              Thank you all very much for that