I am hoping someone may have an idea for what I am trying to do.
I have built html emails using Xerocode plug in. I added my own main merge fields in this like ##STUDENT NAME## etc. When a user creates a new or updates an existing student profile bubble will generate an email that goes to relevant staff on my side to inform them. We use about 30 find & replaces to replace the mail merge fields to the data inputted.
So for a new record it works fine. All data entered is emailed.
We can do the same when a student is modified to show the result after modifications by pulling from the input fields with new values. However what we would really like to do is only show the data that has changed to make it clear to my staff what the user has changed or even better we might do an email that shows both before and after only for the fields that have changed. For either case I am not sure how to do this. The easiest way in the Find & Replace “Replace By Input” box would be to use a conditional statement before db update that says “If the input value = the db value then blank it out (replace the mail merge with empty text box) and if the input value <> the db value then use the new value”. We would then easily include the old value to which would show what it changed from.
Because we have 30 Find & Replaces which would mean so many 1000s and 1000s of permutations I cannot go through all combinations. I wonder if there is an easy to do this. Can a text field be built with conditionals? like “If x=y then “” else x” or something like this?
Thank you so much! I have spent a whole Sunday on this!!