How to show both old and new data that is updated via a Workflow PDF template

I know Iโ€™ve seen info on this at some point in the community or in Office Hours, but I canโ€™t seem to find it againโ€ฆ

I have a Workflow that generates a PDF template and then emails it it to key departments when certain information is updated. Itโ€™s easy enough to get the updated data on the template by simply putting the column name on there but I would also like to show the old data that was updated in the template so people can see the old vs. the new info. What expression would I use in the template to show what the data was before it was updated?

Simple example:
Customer phone number, [Phone], is updated. I need the PDF to show both the old phone number and the new phone number when that data is changed.

Any help is greatly appreciated. Thanks!

0 8 331
8 REPLIES 8

Hi, you can show them either with [_THISROW_BEFORE].[Phone] or [_THISROW_AFTER].[Phone]

Aleksi are you sure this will work on workflow expression ?

Yes, it will work.

Great, I will use the trick on the next opportunity.

This is bit too technical side of question. It is understandable [_thisrow_after] value is retained, as it is just โ€œcurrentโ€ value in the field. But how long and just how does Appsheet โ€œretainโ€ the [_thisrow_before] value?

When we refresh the session, the _before value would gone? I assume it is stored in Client side somewhere, cache, browser storage etc?

This format [_THISROW_BEFORE] only works with the workflow when you create a pdf right after a data change. It doesnโ€™t work as a normal expression like an app formula. If you change something else than [Phone] field, the [_THISROW_BEFORE].[Phone] and [_THISROW_AFTER].[Phone] are the same.

I can confirm that it works! THANKS!!

-Kelley

Youโ€™re welcome

Steve
Platinum 4
Platinum 4

For reference:

Top Labels in this Space