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! Go to Solution.
You can try the following
Action: Decrement (Set the values....) -> [Order] - 1
Action: Execute Decrement (Execute an action on..)
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.
You can try the following
Action: Decrement (Set the values....) -> [Order] - 1
Action: Execute Decrement (Execute an action on..)
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.
Here is a relevant tip by @MultiTech
Manual Sorting (Move Items โโ w/Buttons) || Bonus:... - Google Cloud Community
Whenever I go to implement this sort of manual sorting thing, I always come back to that post and it surprises me that there's so much involved with making it work.
Each time I always try and rethink about it, is there a way for me to remove one of these actions from the list? Is it really necessary for me to create something like 14 different actions in order for this to work smoothly?
And every time I come to the same conclusion, yes. ๐ you do need all of those actions in order for this sort of system to work smoothly.
Only 2 actions with @TeeSee1 solution (but there is no parent/children relation involved)
That's nice ! This is the magic of [_thisrow] value !!
Thanks a lot !
User | Count |
---|---|
16 | |
11 | |
9 | |
8 | |
4 |