Record conflicts due to slow internet

Does anyone have a solution for the following.

We have an action-table in which rows “live” from anywhere from a couple of minutes to hours. These rows have buttons, one of the buttons is active when certain conditions are met - upon pushing the button a field in the row is updated and causes the button to be inactive. Until some other conditions are met, the button may not be used again.

There are anywhere from 2 to 10 people active in this doc and everyone is allowed to push this particular button. This works mostly fine, but sometimes the document does not update instantly or all users, and in those situations it happens after user 1 pushes the button and updates the row, user 2 is still seeing the original instance of that row with an active button and pushes it again.

One of the button actions is to write a record to another table and in the situation as described this happens twice and that is not very desirable. Since we work with time codes, it is not a simple matter of checking on duplicates in the secondary table.

Is there a quick fix to prevent this, or do I have to write routines to somehow double check in the secondary table if the action has already been taken. Since all the actions take place in the doc on the phone/tablet I can’t think of a way of checking if the user has the latest instance of the doc in his tablet before doing the write to the 2nd table.

Any suggestions?

Dear @joost_mineur,

Not sure if it’s a workable suggestion, but you might consider this:

What came in mind was to play around by using a delay, as explained in this post, before the button becomes active again.

Hello @Jean_Pierre_Traets ,
I am not sure how that is going to help if the document which is used by the other user is not synced yet. If it is synced the delay would work, but this is exactly the problem: if the doc was synced the button would already be disabled, since some other conditions are not met anymore.
If the rows would be real database records, the record itself would create an error if it was already changed by another user, but here this is not the case. In the past I used an automation to check if a row was altered and then write my log record, since this was server based (I guess) it would not fire twice (I think), but the delay using the automation (it fired upon modifying a row and then checking some conditions) was quite big, so I build the action of writing a log record into a button.
It is pretty complicated to test, because the errors are real, but hard to reproduce.
Hopefully we get some Europe based AWS, that might help some.
Greetings,
Joost

Looks like you made a deep dive @joost_mineur, why not to get in touch with support, maybe one of the engineers is able to advise you.

Whatever outcome you get, please post a small update as reference as it might become a relevant question to all of us.

@Jean_Pierre_Traets,
Yes, I will do that. Just tried some more options, but those didn’t work (yet).
Will keep you posted.

2 Likes