Updata data across users

Hi

I am experiencing a recurring error regarding updating data across users. All data is stored in Glide tables.

Usecase: Users got at “get case” button; when pressed, they get a “random” unassigned case assigned to them.

Works via: I have table “cases”. In that table is a colums called “email”. When cases are assigned to a user, the user’s email is written in column “email”. (New data is added to the table).
I got a query (in users table) that contains all cases where coloum “email” is empty, sorted random. Cases are assigned via this query (single value, first case row-id from query → relation → set value).

What occasionally happens:
User 1 press button and get assigned case XX.
2 min later, User 2 press button and gets assigned the same case XX. Aka, the query on User 2’s computer hasn’t updated, and stille see case XX column “email” as empty.

Is there any way i can force a “data update” before cases are assigned?

What about using single value > random here so there’s less chance of it being a duplicate?

When you say you store this data in Glide Tables, I assume none of them is a Big Table?

Sorry, wrote that a bit quickly, im using query sorted in table order, and single value random. The challenge is, that the query sometimes includes cases that’s already assigned.

What I would try is showing a component that references that table, or anything from that table, on the screen where you’re having the button with that action. I’m not sure if that helps solving the problem, but theoretically if the screen has to load that table, there’s a bigger chance it reloads before the second user clicks the button.

My other option is using a Reload Query action, but seems like it’s only on Big Tables.

1 Like