Hi guys,
Please kindly help me below
I have Table 1 with columns : [ID], [PRICE], [NOTE]
and Table 2 with columns : [ID], [TIME STAMP], [CATEGORY], [OLD DATA], [NEW DATA]
In case, I change a row data of [PRICE] from $1 to $2, then how we can automatically create a new row in Table 2 with :
- [ID] = UNIQUEID()
- [TIME STAMP] = NOW()
- [CATEGORY] = "PRICE" ( because data changed on the [PRICE] column)
- [OLD DATA] = $1
- [NEW DATA] = $2
Solved! Go to Solution.
For [Price], you can detect change with a BOT that triggers on data update with the following condition.
You will need a similar approach for [Note] column. You can suitably OR() it with the above condition for data change of BOT
Please explore below.
Please create a column called say [PriceBefore] in the table 1 with an app formula [_THISROW_BEFORE].[Price]. Please keep it hidden.
Use an action type "Data: add a new row to another table using values from this table" from table 1 to table 2 and set the following columns to get data into table 2 from table 1
- [ID] = UNIQUEID()
[Table 1 ID] = [ID]
- [TIME STAMP] = NOW()
- [CATEGORY] = "PRICE"
[Old Data] =[PriceBefore]
[New Data]=[Price]
I think you will also need a column of [Table 1 ID] in table 2 as highlighted above because you need to know you have changed price for which item from the table 1
Edit: I think you may need a bot with condition [_THISROW_BEFORE].[Price]<>[_THISROW_AFTER].{Price] to trigger the action.
Thanks,
How about the [CATEGORY], for example if I changed the data on the [NOTE] column on table 1
then how to make app sheet record on Table 2 with the [CATEGORY] = "NOTE"
You can apply similar logic. You may need a column [NoteBefore] and so on.
How to let appsheet know the data I changed is son [NOTE] or [PRICE] column?
For [Price], you can detect change with a BOT that triggers on data update with the following condition.
You will need a similar approach for [Note] column. You can suitably OR() it with the above condition for data change of BOT
User | Count |
---|---|
37 | |
30 | |
29 | |
22 | |
18 |