Okay, I managed to get this working. It was some experimentation like you said @Darren_Murphy. Here’s what I did finally (names are specific to my app)
- Create a JSON column ‘Programme as JSON’ for the table I want to log changes for. Add all columns as values. This column will represent the current value always.
- Create a user specific column ‘Log/Before values’ in the Users table to store the before values of the row. This acts as the intermediary between the before and after actions of the form
- Create 2 workflows:
a. One for saving the before values in user column created in step #1 above when edit screen is opened. So, Show Edit Screen + Set column values
b. Another for logging the changes in a ‘History’ table.
Both of these will use the same table column value ‘Programme as JSON’, but since the workflows are triggered at different stages, they will hold different values - Use these workflows on edit and on submit. Note that adding to show detail screen will not work when the user decides to edit a second time from the detail screen. So this part is important.
This will need to be repeated for every table that needs to be a history log
Attaching screenshots for others’ reference.
Thanks for the direction @Darren_Murphy!