Hi there, sorry if this is an obvious question; I’m still very new to Adalo and I wasn’t able to find something similar in the forums already.
Let’s say I want to have a number of records in the same table each have a different sequential number but I want the gap to close when one of those records gets deleted, how would I go about doing that? For instance…
If I wanted to create a waitlist that draws from a “Users” collection with a “Position” property. I’d use {max position+1} to set each new user’s position:
User, position
A, 1
B, 2
C, 3
D, 4
E, 5
F, 6
G, 7
Now say user C drops off the list and that row is deleted (or otherwise filtered out, depending on what will work best here), I would like to be able to run an operation that would be able to identify the gap and cause the record for D to update to 3; E to become 4; F → 5, and G → 6. After that, if a new record gets added, let’s say user H, their position would be 7 (which is now the new {max+1}.
Is there a user-end-friendly way to do this without using an external service?
Thanks so much for any help on this. I know it’s niche but I’ve already seen so many clever workarounds in the forum that I’m crossing my finders someone has one for this too!