Dynamically move List Item Up/Down

Hey guys @Experts , I am wondering if someone can help.

  1. My aim is to be able to arrow up and down a list item by pressing arrow up/down.
  2. The list order is set by a numeric field called “Order”
  3. Arrow up action = Current Order -1
  4. Arrow Down action = Current Order +1

Problem:
With this method the value for the item order directly above/below doesn’t automatically update, and therefore I can have multiple items with the same numeric order value, I.e. if on Item No.2 I press Arrow Up, it will go to No.1, but item no.1 doesnt dynamically changed to No.2. Could someone advise of a possible solution?

Hi, maybe you could sort your list like “List item value high to low” or viceversa. So when you press the arrow to “move” list item, it updates it’s value +1 or -1 depending on the button pressed. Make sure the auto refresh option is active for your list. Also, to remove duplicates, maybe a conditional action is fine, it will trigger the “move list item action” only if current list, does not contain current list number.

Hi @iAppsNi,

In “general case” this could be complicated, but may be in your case it could be done.
Questions:

  • how the list is formed? Is it formed once by someone? or is it completely dynamic?
  • on this screen, can user add/remove items from/to the list?
  • what’s the list size (max)?
  • is there a case when user inserts the item “to the middle” of the list (between 2 items)?

Best regards, Victor.

  • how the list is formed? Is it formed once by someone? or is it completely dynamic? Yes it is by somone in their profile.
  • on this screen, can user add/remove items from/to the list? Yes
  • what’s the list size (max)? Unlimited (usually 10-20 max)
  • is there a case when user inserts the item “to the middle” of the list (between 2 items)? No

Any help is greatly appreciated :slight_smile:

Hi @Eugen,

Here is the challenge which I see. Imagine you have variable in the list, like SortID. And you have the list like:
A — 1
B — 2
C — 3
D — 4
E — 5

For instance, you’d like to move C below D, so that the list is sorted like A B D C E.
You can create a button in the list, to update Current Item → SortID. But the problem is that it is not possible to get the SortID of next item, so that you know to which value should you update SortID of current item…

Best,
Victor

1 Like

Hi @iAppsNi,

I think I found possible solution, though some more testing is needed. It is quite cumbersome but seems to work.
I’ll post later here.

Best regards, Victor.

1 Like

Legend Victor. I look forward to it. I have tried several ideas, but came up with multiple list items with the same order no. Every time, meaning varying click amounts for the item to move. Any help is greatly appreciated :slightly_smiling_face:

Hey Vuctor, did you have any luck :slight_smile: ?

Hi @iAppsNi,

First part is almost ready. The video is pretty long…

Best,
Victor