Best method for letting users rank items besides drag-drop

i want to give the option for users to be able to rank items in a repeating group, i understand i could use a Drag-Drop element for this, but so far i’m not comfortable using it (didnt fully figured it out yet).

Whats the next best hassle-free-for-the-user method to rank items up and down?

I can let the the user enter a ranking # to change its rank, but that change will not reflect in the rest of the items.

I was thinking about displaying an up-down button on each item, and when clicked, it will move the item up or down the rank, but i’m not sure how to program such behavior

Any help?

Up down button would certainly work.
You could put a field in your thing that your listing in the repeating group called “sort_order”, then when you press up have a workflow something like the following

When up button is pressed ->

Modify thing,
Repeating groups things: item number Current cells index -1’s,
sort_order = current cells sort_order

Modify thing
Current cells things
sort_order = current cells, sort_order - 1

And vice versa
Sort the repeating group via sort_order

sorry, couldnt understand clearly, if u dont mind

I’ve edited the reply so it may be a little clearer hopefully it helps

Is there such an option?

Yes so you can refer to a repeating group and the things is just the name of the list of your things

Say your repeating group is called RG1 and your thing is called “invoice” then you would be referring to “RG1s list of invoices” in the thing to modify space,
Since you want to modify the “invoice” from the cell before the one the button is located this becomes “RG1s list of invoices:item current cells index - 1”

Basically instead of doing a “search for” or referring to a “things list of things” you are referencing the repeating group directly

Sorry I can’t screen shot I’m away on holidays and aren’t suppose to be computering

1 Like

Wow, brilliant! now i got it! thanks

Make sure you mark as solved please

No problem, let me try it first, and see if any issues arrises

Bubble doesnt provide the - or + operators after "item # current cells index

Hmm so it doesnt.

I cant rememeber what I did however I may have put a group in the cell with the type a number and the datasource to be this cells index -1 then refer in the workflow to the value of that group.

Im mystfied as I was sure there was a + and -


created a “bug” topic for this

So after hard work, i learned the following:

Those 2 actions should be on 2 separate parallel Workflows, otherwise the first action will change the meaning of “current cell’s thing”, because the adjacent thing will take over this cell.

Am i right with this?

This topic was automatically closed after 70 days. New replies are no longer allowed.