Email after each update

I am hoping to generate an email after each change is made in a table.  Obviously the trigger on Updates would work, but I would only want the changed columns to be in the email, and the email to say....

The following Job "John Doe" has been updated.  Updates are as follows

start_date was 2022-09-09 and became 2022-09-10

job_notes was "blah blah blah" and became "client is a happy person"

I can't think of a way to accomplish this without listing all columns using _THISROWBEFORE _THISROWAFTER

I really just need to columns that were updated, not the entire row

 

Solved Solved
0 5 116
1 ACCEPTED SOLUTION

Steve
Platinum 4
Platinum 4

@Dan_Oliphant wrote:

I can't think of a way to accomplish this without listing all columns using _THISROWBEFORE _THISROWAFTER


Yep, that's how to do it.

View solution in original post

5 REPLIES 5

Steve
Platinum 4
Platinum 4

@Dan_Oliphant wrote:

I can't think of a way to accomplish this without listing all columns using _THISROWBEFORE _THISROWAFTER


Yep, that's how to do it.

I created a Google app script that will highlight the cells if they are a different value, to make it easier to see the changes.  Any guidance on (or is it even possible) to call the script THEN generate the PDF via email in appsheet.  Having trouble wrapping my head on the timing and if it's even possible 

You are correct in that there is no AppSheet provided way to identify only the changed columns.  There are things you can create but it seems no matter which avenue you go you would need to do a column by column comparison.

I don't know if this is an option, but instead of trying to extract the changed data by column for the user, you could simply show the BEFORE state of the row and the AFTER state of the row and allow the user to compare and identify the differences themselves.

by that logic, could I create like 50 virtual columns with if statements that say if BEFORE is equal to AFTER, then BLANK else show BEFORE and AFTER?  is there a limit to virtual columns???

Virtual Columns will not work.  The BEFORE state of the row will not be available when a Virtual Column is re-calced. 

I think @Steve is right, you will need to use the [_THISROW_BEFORE] and [_THISROW_AFTER] properties to inspect each column individually.

 

Top Labels in this Space