Save the previous column value

Hi! I need help, namely in my table each item has an assigned location. However, the location of this item can be changed by the application user.

I would like to save the history of changing this location, so I created two more columns “old location” and “older location”.

At the beginning, I tried the solution that I found here on the appsheet community, ie using an appformula for a column, eg “old location” [_THISROW_AFTER]. [location]. Unfortunately, this solution does not help me, because I have a workflow, now the bot :smiley: (great solution), which after changing the location starts and changes the value of one more column in the same row, thus calls the appformula again and the value in location and old location becomes same :confused:

Is there any other way to solve this problem?
Thanks in advance for your help and your time!

[_THISROW_AFTER]. [location] would get the new value of the field, not the old value. [_THISROW_BEFORE]. [location] gets the previous value, but you probably already know that.

If you can’t get around the logic of needing two consecutive data changes, then perhaps this would help you construct your formulas so they just dont update when its a ‘bot update’.

IF( CONTEXT( “Host”)<>“Server”, DESIRED FORMULA , [_THIS])

Or, (this one may or may not work), you can remove the column-side expression in “old location” and “older location” and just include a data change task/action on your Bot’s process that is responsible for setting those values. This hinges on the assumption that a bot could get the location of the user that triggered the automation, which I am unsure of. Just wanted to give you another option.


Of course you are right, I meant BEFORE. I will test the formula and tell you if it works.As for method two, it didn’t work for me :smiley: