the data is a bit more complex, but i’ll limit the details to pinpoint the challenge i’m facing:
i have 3 data tables: users, items, and slots. i’ve set up the relations and lookups etc so that they’re kinda bound to each other. items are raffle prizes, and slots are ticket numbers. normally i would have populated a card view that users can click on, when selecting their preferred slot. it would have been easy to display and allow/disallow slots that are available vs taken. problem is, some items have 5000 slots, so i’m trying a workaround - i’m letting the user manually input their slot number. i have spent the whole day trying to do some validation (via additional columns including lookups, item+slot combo (template), and even via custom actions upon submission.
in short: im only trying to prevent duplicate slot entries.
i cant do custom code and would really like to get this working purely via glide internal tools. most of the other challenges i encountered (and solved thanks to this community) have been valuable lessons for me, and i really hope i have finally found the right solution for my solo “dev” career path.
There are various ways to approach this, but before I offer any advice let me ask a question.
How likely is it that two users might be attempting to select a slot at about the same time?
If there is a chance that might happen, then this is not an easy problem to solve, and you won’t be able to solve it without using something external to Glide.
Okay, if we disregard the potential for race conditions resulting in multiple users claiming the same slot, then the way I would approach it is with a Custom Form. Capture the slot number in a User Specific column, and use that to build a relation to the table where all the taken slots are stored. If the relation is not empty, then the slot is already taken.
For a more robust option that eliminates the possibility of race conditions, you might want to use something like Upstash or Make to manage the allocation of slots. Have a read of the below, and the reply from David: