2 Replies Latest reply on Jul 2, 2014 1:45 AM by Polarpro

    Show changes


      When a user makes a change in the MAIN TABLE, a record in the SAFE TABLE is stored that shows the record exactly in the way before the changes were made. So, a user can look at all the records in SAFE that belong to the record in MAIN, and he can compare what has happened. The primary key in MAIN is a foreign key in SAFE. On the layout in MAIN Full View there is a portal that shows all the SAFE records that belong to the record in MAIN, sorted in creation order.


      It would be nice if I could format the changed fields in a way, so that the user easily can see which fields have changed. For example: If a change was made in the Name field, then it would be good if the youngest record in the portal of SAFE records would have a red border around the Name field.


      So, I'm looking for a way to compare a SAFE record with its predecessor, in order to make a conditional formatting happen.


      I'm grateful for any idea...


      :-) Mike

        • 1. Re: Show changes



          I use this technique, for instance, in creating a "de-duping" screen where "Main" would be the "keeper" record and "Safe" would be a suspected duplicate record.

          The user can pick two records and see the data side-by side; most importantly with any differences highlighted in yellow so they instantly see anything

          that needs to be copied to the "keeper" before deleting the duplicate.


          Here's an example formula for the conditional formatting, assuming you have a "MAIN" table, a "SAFE" table related to it (TO name is "main SAFE") and

          all the applicable fields in "SAFE" are the same as in "MAIN" —


          You can apply this SAME formula to each of the fields in the "MAIN" screen that you need to compare, since this formula uses the Self function.




          me = Evaluate( GetFieldName( Self ) );

          it = Evaluate( Substitute( GetFieldName( Self ); "MAIN"; "main SAFE" ) )



          it <> me




          Here's an attached Demo:

          • 2. Re: Show changes

            Dear Erik,


            Thanks a lot for your explanation and the demo file! Very helpful, and a very cool way to compare field contents.