This is exactly what I have been doing for my app.
After many working around, I find below solution is most suitable for me:
Example, you have an inventory app that has a table named “INVENTORY”; and you want to track all changes of INVENTORY table.
Step 1: Decide the columns that you need to track changes (ie. [Item Name]; [Qty]; [Buying Price]; [Notes] so on…).
Step 2: Make a NEW table named INVETORY.bak with 1st colum named [UniqueID]; 2nd column named [Inventory Id]; and rest columns as listed in Step 1.
Step 3: Add the table INVENTORY.bak to your app.
Step 4: Create a NEW bot, that run everytime the data in “INVENTORY TABLE” changed.
See below, and make sure to change table “currentstatus” to “INVENTORY”, then click “Add a step”
Step 5: Continue following
- Click new step / Run data action/New Action/Add New Row/
- At the option “Add row to this table”, make sure to select “INVENTORY.bak”, that is the table that you added earlier.
Now it come to the tricky parts:
Under “With this value”, COLUMN ON THE LEFT is the column in your INVENTORY.bak table; that you want to store the changes.
COLUMN ON THE RIGHT is the value in your INVENTORY table.
As the sample picture below is from my app, so you should read carefully
First row: UniqueID => uniqueid()
2nd row: Change “COUNTY” to “Inventory ID”; and Change [_THISROW] to [_THISROW].[name of the ID colum of your INVENTORY TABLE]; example: [_THISROW].[UniqueID] (UniqueID is the ID column of your inventory table).
Hit Save; and all is set.
Now, you want to reflex changes to your INVENTORY TABLE right?
In your INVENTORY table, create a virtual colum name REVISION HISTORY;
App Formula: FILTER(“INVENTORY.bak” , [Inventory ID] = [_THISROW].[ID])
Type: List
Element type: Ref
Reference Table name: INVENTORY.bak
Hope this help you!