3 Replies Latest reply on Oct 19, 2016 11:45 AM by philmodjunk

    How to trigger and email when a record is changed ?


      Hi All


      i currently have a database which hold the records of our members. it is hosed on a filemaker server and is accessed and updated by multiple users. one of the issues that we have faced is that when one person changes a record other want ot be notified of this change. i am wanting to have a script or something which triggers an email to other users advising them of the record which has been change.

      Any help would be appreciated.



        • 1. Re: How to trigger and email when a record is changed ?

          What would you have a recipient of such an email do with the record in question?

          Change it to what they think it should be?

          Then the other person gets a notification and changes it to what they think it should be..infinite loop.


          In a multi user situation a data change made by one user is presented to all users after commit.


          if you need to track what users are doing in order to prevent data errors then a scripted data entry process and/or audit trail is reccomended.

          • 2. Re: How to trigger and email when a record is changed ?

            Assuming you have a modification timestamp field, you can have a schedule script that runs periodically (e.g., every 10 minutes) and looks for modification dates greater than 10 minutes ago and send an email.  That can get annoying and often I look at running a script to show which records have been changed say in the last day, etc. 


            You can keep a history field that is populated overtime the modification timestamp changes that list who has made changes to records.  Or you can into a full audit that shows what the changes were if you want to get into things like CNS Audit, MBS Audit, or WorldSync, which include rollbacks, etc. 

            • 3. Re: How to trigger and email when a record is changed ?

              You might look at setting up the OnRecordCommit trigger, but there are potential problems as the user can edit some data, commit the changes, edit some more data and commit the changes--each causing another email to go out.


              You might consider, as others have recommended that you control the editing process so that there's a definite user action needed to "save" all changes. One such option is an "edit" button that opens a new layout to a set of global fields that correspond to the data in this record. The button opens the layout and sets the global fields to the values from the record. A save button would then use set field to transfer the data back to the original record and this script could then include a "send mail" step to send out your notifications.