Highlight column data changes while sending an email

I am wondering if anyone has found a way to highlight the data that has changed while sending an email from an app.  Is this possible?  If possible, how did you achieve this?

1 3 65
3 REPLIES 3

Since AppSheet is a ROW based system, we don't have access to which column(s) changed. 

When a bot is triggered on a Data Change,  we do have access to the BEFORE state of the row and the AFTER state of the row.  You could build into an email template, conditional expressions that check if a column changed (i.e BEFORE <> AFTER) and if so include it on the report.  This would be tedious but very informative to the user, especially if you have a lot of columns you want to include in the reporting.

The easiest approach is to simply show the complete BEFORE row and then the complete AFTER row (or whatever subset of columns needed) and allow the user to identify which columns changed.

I hope this helps!


@WillowMobileSys wrote:

This would be tedious but very informative to the user,


I would agree with this sentiment, especially the tedious portion. A couple of things to note, [_THISROW_BEFORE] and [_THISROW_AFTER] only return the key column value rather than metadata about the row like JSON of the entire row. So using these solely in a comparison or to reference the entire state of the row before or after changes does not in fact function that way. You always need to use this in conjunction with an actual column like [_THISROW_BEFORE].[Your Column of interest]. So your event trigger needs to be configured with a OR() formula and then include [_THISROW_BEFORE].[Column] <> [_THISROW_AFTER].[Column] for every single column you would want the 'change log' to trigger for or just leave the condition empty to always trigger onChange events. Either way you would then need to include the comparison in your template by using <<If: [_THISROW_BEFORE].[Column] <> [_THISROW_AFTER].[Column]>><<[Column]>><<EndIf>> for example.


@WillowMobileSys wrote:

The easiest approach is to simply show the complete BEFORE row and then the complete AFTER row (or whatever subset of columns needed) and allow the user to identify which columns changed.


But we like to do things the hard way, right!? 😜

Did you know that in a template you can have differently formatted text in an IF() formula?

MultiTech_1-1710005096054.png

<<IF([_thisrow_before].[column] <> [_thisrow_after].[column], *[Column]*, [Column])>>
  • Where the first column (marked with asterisks: *[column]* ) is formatted in some special way:
    • [column]
    • [column]
    • [column]
  • You could even include additional characters in the formatted branch:
    • Concatenate("⚠", [column], "⚠")
    • Concatenate("👉", [column], "👈")

  • And if you're feeling especially confident: 
<<IFs(
  [_thisrow_after].[Number_Column] > [_thisrow_before].[Number_Column], 
    Concatenate([Number_Column], "⬆"), //WITH GREEN FORMATTING  
  [_thisrow_after].[Number_Column] < [_thisrow_before].[Number_Column], 
    Concatenate([Number_Column], "⬇"), //WITH REDFORMATTING  
  TRUE, [Number_Column]
)>>
____________________________________________________________________
// Expanded for easy reading; when used you CANNOT include line breaks
// Remove the comments as well, they're not supported - just there to be helpful

Hope it helps!

 

Top Labels in this Space