Moving list items with arrow - Changing Sort value

I have a list that is sorted by Category first, and priority second.

Priority is unique by category. IE: there cannot be 2x Cat A, Priority 1’s.

I’d like to be able to move items up and down the list with arrows as shown below.

Any idea as to how I can accomplish this? Thanks!

Since the RG is sorted by Cat and Priority, the only way to change an item’s position is to change its Cat or Priority.

That said, it’s not clear how you want the arrows to function. If you click the up arrow on Test B 3, should the item be moved into the A Category and take its place between Test A and Test A 1? If so, what would its Priority value become to ensure that all items in Category A have unique Priority values?

Also, does an item’s name unambiguously tell what the item’s Priority is? If not, it would be helpful, at least for development and testing, if each RG cell showed the item’s Priority.

More specifics about what you’re trying to accomplish would be helpful.

Category will stay the same, arrow up or down should only move its priority. So when you’ve hit the top of a category, you’re done, can’t go up anymore - Same with down. When you’ve hit the bottom of your category, you’re done.

Name is unimportant, I added numbers just to track them individually. Name could be “Blow out saw” and “Replace blade on Saw”

Thank you.

One more question and I’ll guess the answer.

Is Priority an integer? I’m assuming the answer is yes in which case, I don’t know how to handle this off the top of my head.

If Priority is not displayed and need not be an integer, I’d recommend reading some of the topics on drag-drop in the forum. There’s been a lot of discussion, with some hints about how to change the sort value. (If you get into one of the older threads, you’ll see that I struggled with it for a long time.)

If Priority is an integer, it’ll be necessary to change Priority in all the displaced items. That’s beyond me at this point.

The other thing I’d suggest is looking at is @keith’s List Shifter plugin. Maybe you won’t need the plugin, but you can benefit from some of Keith’s video tutorials.

Good luck with this. Hopefully someone can provide more direct help.


Yeah, @mikel, List Shifter (though it does a zillion other things) is actually designed for exactly this: Taking items in a list and re-ordering them. (It has “swap items”, “shift item up”, “shift item down” actions that can be used to build what you’re doing very easily).


Keith! Awesome thank you! I’m looking into this now. Do you have any more in-depth documentation on how I can get this implemented?


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