Auto changing priority order numbers when one item changes

Hi everyone,

I have a ‘to do’ list of sorts where each item must have a priority order (currently set as a number against each item in my DB).

On my UI, I want to put a ‘increase priority’ and ‘decrease priority’ button against each item.

But is there a way to ‘auto update’ / ‘auto increment’ all the priorities of the other items at the same time as one item changes?

e.g. Imagine I have item 1 - priority 1 and item 2 - priority 2.

I want to make item 2, priority 1 by clicking the ‘increase priority’ button. But I would need priority 1 to then change to priority 2 automatically. (and if it was a longer list, you’d need everything above an item to change.

Is this possible in Bubble?