Update a row via an action without changing the data

There are situations where you want to update a row via an action. For example if you change a row in Table A and want to update a column in Table B, that's referencing to Table A. If you don't built this update mechanism, the user has to wait until the next sync to see the update in Table B.

Usually we use an Action that changes a value in Table B. For that we need an extra column just for that.
Now I found a way to do this without an extra column.

Fabian_Weller_0-1677147561393.png

This Action changes the value from column [Ersatzteil] to "Update" and then changes it back to it's before value. With the expression [_THISROW_BEFORE].[Ersatzteil]

So in fact there is no data change at all. That's why in the google sheet nothing changes.

P.S.: The expression assistant gives this error: Unable to find column '_THISROW_BEFORE'
But the action is working.

Fabian_Weller_1-1677147748089.png

@Steve @MultiTech @Koichi_Tsuji @Suvrutt_Gurjar @GreenFlux 

 Edit:

[_THISROW_BEFORE].[Ersatzteil] as in the OP is no more working.

I tried diferent versions with no luck like:

  • ANY(SELECT(Ersatzteile[Ersatzteil],[Key]=[_THISROW].[Key]))
  • LOOKUP([_THISROW].[_ROWNUMBER],"Ersatzteile","_ROWNUMBER","Ersatzteil")

Now in the second step it will just take the word "Update" from the first step in the Grouped Action, not the value before the grouped action was started.

But I found a more robust way. And: It also does not send any data change to the google sheet.
So the grouped action does a data change, but after the grouped action finishes, the value is the same, and that's why there is no data change sent to the google sheet.

Fabian_Weller_0-1680769162812.png

First step: [Ersatzteil]&"Update"

Second step: SUBSTITUTE([Ersatzteil],"Update","")

 

13 8 1,279
8 REPLIES 8

If there's no change, is it really updating the record then?

  • I can see how this would probably cause VCs to update... but what about physical columns?

 

@MultiTech yes it is updating the record. There is a "1" in the orange bubble on the sync icon. But there is no data sent to the google sheet if you use it to update a VC.

It is working also for updating physical columns.
In the GIF you can see my test app.
I use 3 columns

  • DateTime with Reset on Edit (physical column)
  • ChangeTimestamp that's listening to changes on the Enum Column (physical column)
  • DateTime VC (virtual column)

I then have 2 actions.

  • The first action changes the value in the Enum Column. By that, all 3 columns update. (After the background sync, the virtual column updates again which is normal.)
  • The second action uses the method I described in my first post. With that only the DateTime and the DateTime VC will update. The ChangeTimestamp will not update. This indicates that there was no change to the Enum Column. 

Here is the GIF:

 


@Fabian_Weller wrote:

there is no data sent to the google sheet


If anyone is interested in more explicitly confirming, it should be possible to review the app's audit log to see what's explicitly sent. Or, even more directly, review the cell edit history in the spreadsheet.

That's true @dbaum or you can open "Show Changes" in the menu of the app to see what is sent to the google sheet.
And in Google Sheet you can see the "Last edit on ...".
In this actual case there is no activity on the google sheet if you use my method to update a VC.

Steve
Platinum 5
Platinum 5

Whoa, I was just wondering about this the other day! Brilliant!

@Steve I hope it is an intended behavior and not a bug so we can hope to keep this function ๐Ÿ˜€

I've just added an update in the OP.

that's brilliant ๐Ÿ˜Š๐Ÿค thank you for sharing

Top Labels in this Space