Hi all! Very new to this, so I hope this isn’t a silly question.
I’ve managed to make a small app where registered users can update their “rank” via an input, and all of the users ranks are displayed in a repeating group.
I want to make it so when someone updates their rank, it swaps values with the previous holder of that rank.
Eg: User B’s rank is 5. User A’s rank is 1. When User B updates their rank to 1, User A’s rank becomes 5 without affecting users with ranks 2, 3, and 4.
Make a change to a User. User to change = Search for Users :first item. The search has a constraint: rank = input’s value. Change to make: rank = current user’s rank.
Make a change to a User. User to change = Current User. Change to make: rank = input’s value
Step 1 changes User A first, then step 2 changes User B.
Try that. I’m not 100% the order of actions will be honored since Bubble might run them in parallel. If not, you can schedule a custom event to run step 2 to force it to happen after step 1.
If i click close, the “thing to change” box turns red and it wont give me an option to tell it what to change.
Edit: also, as i continue to try more things, somethings the inputs value isn’t an option. Sometimes it is. I don’t get it.
Edit 2: Figured it out! I didn’t realize that :first item was something i had to set. Once deleted the entire workflow and started from scratch with that in mind, everything fell into place perfectly. Thanks a lot!