4 Replies Latest reply on May 13, 2014 1:50 PM by glorifindal

    Get Modified Fields

    glorifindal

      Filemaker 13 has the fantastic new funtion: Get Modified Fields

       

      Does anyone have a Filemaker 11 function similar to this?

      Would be great

       

      Many thanks in advance

       

      G

        • 1. Re: Get Modified Fields
          mikebeargie

          Not really as easy, but you could build a "list" of modified fields by using a layout based script trigger (IE OnLayoutKeystroke), paired with Get(ActiveFieldName)

           

          Something like:

           

          If [ Last( $$modified ) <> Get( ActiveFieldName ) ]

             SetVariable [ $$modified ; List ( $$modified ; Get( ActiveFieldName ) ) ]

          End If

           

          You could then set an OnRecordCommit script trigger that resets the list when the record is committed.

          • 2. Re: Get Modified Fields
            glorifindal

            Thank you for the answer ...

             

            I think I have not been clear enough in the original posting (no surprise there)

             

            What I actually need is the before / after values from the modified fields - so as to be able to use them in an Audit.

             

            So, I would need the field name and the field old value / new value ...

            • 3. Re: Get Modified Fields
              mikebeargie

              That's completely different than Get(ModifiedFields)

               

              It can be accomplished with an OnObjectEnter script trigger on the field to record the value to a global variable, then either an OnObjectValidate, OnObjectSave or OnObjectExit script trigger to record the changed value. The exit action would also be the trigger to record the original and changed value to your audit trail table.

               

              I'd save yourself the trouble and use on of the existing audit logs out there, like this one:

              http://www.nightwing.com.au/FileMaker/demosX/demoX01.html

              • 4. Re: Get Modified Fields
                glorifindal

                Many thanks -

                 

                your totally correct - I don't fully understand the Get(ModifiedFields) function ...

                 

                Many thanks