These are great ideas, Iâm writing my ideas out to see potential challenges.
Add an action to set the userâs email to a global column. Only allow going to the edit screen when that column is empty or that column is the signed-in user.
However, if I recall right, the âon submitâ action of the edit screen does not work with the âcancelâ button. If you go into the edit screen and decide to cancel the edit process then that email column never gets cleared.
If the data is not too big then we can theoretically use a set column to copy all global columns to a set of columns under the âcolumn folderâ Log, then after the edit you can do a comparison.
Other way is add a new row to a new Sheet and compare data to the last line of that sheet (retrieved through last row using single column). However it will cost a lot of rows.
I came up with a solution for the changelog (not yet for locking the edit button, which requires a timeout with math and date columns). Feel free to copy this app.
It relies on a âtempâ sheet, in which every user gets two rows, once signed up (âadd rowsâ during sign-up is not implemented yet).
Every sheet, for which changes should be tracked, needs to have two looked-up arrays and two many-to-one relations to these two above mentioned âuser-specificâ rows in âtempâ.
Every âopen edit screenâ action sets the first âuser-specificâ row in âtempâ. Every âon submitâ action sets the second âuser-specificâ row. The comparison between those two rows is made through single value, ITE and template columns in the âtempâ sheet. âSet column actionsâ work through the above mentioned relations.
You can monitor as many columns as you like (I implemented 4: A, B, C, D). Best is to have different columns per data type (not implemented yet).
This solution with 2 user-specific rows in temp is not sensitive to cancelled edit screens, since the first row will always be overwritten once an edit screen is opened.
Let me know what you think. Improvements/feedback are welcome!
I tried a bit with replacing the Cancel text with my own text but havenât succeeded Canât put a customized div in front of the top bar without breaking something else.
Hi @Gregory ,
Great job with this app. I tried to play with it and it did âcatchâ the fact that I changed something, but I couldnât see the change itself, or a before/after comparison. In any case, it seems that this solution is rather cumbersome. Has anyone thought of another approach to logging all changes?
well, not sure. I tried to edit some forms and when you press âbackâ the changes are already implemented in the data. Not sure if this is a planned behavior or if I have something misconfigured.
One approach I can think of is using a form instead of an edit screen. However, itâs still cumbersome.
Letâs say your data has only one column and you âsubmitâ a new value for it through the form. The form writes a row to the new Sheet with that columnâs âcurrentâ value and ânewâ value. Then the âon submitâ action would do a set column back to the original row to save the change.