Manage row order with a dedicated column

Hello,
I'm trying to set up something pretty basic but I can't get it to work.
In a data table, I have an “order” column that I use to order the list display.
A “Plus” action adds +1: [order] = [order]+1
A “Minus” action decreases by 1 : [order] = [order]-1
So far, so good

I'd like the line that also has the new value of [order] to automatically take the previous value (an inversion).
Order = 4 => Plus action => Order=5
=> the old row with order=5 => order=4
How do you do this?

Thanks

Translated with www.DeepL.com/Translator (free version)

Solved Solved
0 5 156
1 ACCEPTED SOLUTION

You can try the following

Action: Decrement (Set the values....) -> [Order] - 1

Action: Execute Decrement (Execute an action on..) 

  • Table -> Same table
  • Referenced Rows -> FILTER("this table", [Order] = [_THISROW].[Order] + 1)
  • Referenced Action -> Decrement

Action: Increment (Set the values..) -> [Order] + 1

Action: Move Down (Grouped...) -> Execute Decrement, Increment

You can do similar for Move Up grouped action if you want.

View solution in original post

5 REPLIES 5
Top Labels in this Space