I have a table [inventory] containing items where one column is [location]. I want to track with a log the change in [location] of this item when users change it.
I need to track the following data and it needs to happen automatically in the background.
-[Useremail]
- [Date] (change date)
- [new location] value
- reference to the item being modified
I imagine I need to create a workflow where a change of [Location] column will trigger the creation of a new row in a different table [Location Change] containing the new column value [new location], with reference to the item being modified, the current date and the useremail?
I have found how to trigger the workflow to change data of a reference column but that row doesn’t exist yet!? Also, how can I transfer the [Location] value of the [Inventory] table the the new entry in the [location change] table.
Is it possible to show the history of [location change] table for that [inventory] item as a reference table in the detail view of this item?
Thanks for your help!
If you don’t have lot of updates, you could record those logs into the same recocrd (in one cell). Could you use that?
Unfortunately, no. I need to track all changes. For instance, for a change in [location], i need to track who did it, when, what is the new location.
It will be the same with other column like daily inspection log. I want to be able to execute a bulk action from a table or deck list to change location of the items, then a record of that change will be logged and be viewable under the item detail view in a ref list.
AppSheet does not (yet?) have any way to automatically, and in the background, create a new record. There needs to be user interaction of some kind. You can reduce that user interaction down to a single click of the Save button by utilizing LINKTOFORM() expression and filling it in with appropriate values for each column. If you absolutely need zero user interaction, you’ll have to find some way to record the information in additional columns of the current record.
What I was thinking with the log value in one field, it could be like…
05/08/2019, jimdumont, locationD,
05/10/2019, aleksi, locationB,
05/13/2019, marc_Dillion, location A
One way could be… if you need to follow only few columns, you could add them as a child records. Not just when you update that record.