Bot set to trigger ON data change seems to run BEFORE data change

So I have an App formula in a table that does a SUM of some items in a different table. Nothing complicated. When I click edit on row in that table the SUM() works fine. Yet I want this to update everytime you make a change in a totally different table. Again, not a drama, done it loads of times.

Iโ€™ve got a bot where the trigger is a change in one column which then calls an action to look at multiple rows and writes a timestamp in a column of the where the SUM() formula is. The reasoning being that timestamping the forces all the App formulas to run and update.

Yet the weird thing is you add an item in the other table, the bot runs, timstamps the first table, I can see other App formulas run yet this SUM one comes up with zero. If I edit the record it adds up fine in the form.

Any ideas? Could the fact hte App is not deployed be causing this? Could put in a delay on the Bot, but 10mins is the shortest time and is going to confuse the users.

0 3 486
3 REPLIES 3

I believe your issue is due to a change in context, between the deviceโ€™s copy of the app, and the serverโ€™s copy of the app.

When you make a new data change, that data only exists on the device until it is fully synced. A Bot will trigger immediately when the data change is made, not after a sync. Which means that the server doesnโ€™t yet know about the new data. Since the Action is triggered by the Bot, it is being run by the server, and the app formula is being re-evaluated by the server, which still doesnโ€™t know about the new data, which is why the result is โ€œwrongโ€.

Instead of using a Bot here, Iโ€™d advise running the re-calculation Action upon Form Save. This will keep everything in the same context.

I think I tried to prove this by letting the data sync and then triggering the bot. But it made no difference.

Good call Iโ€™ll try this and report back

Hi! @Marc_Dillon 
I have similar issue, I have an slice that is filtered by Status. 
When I complete a date , the status change and the Row dissapears.
How do I make that the Status updated only when I save?
Thanks a lot!

Top Labels in this Space