move records up and down with a button

Hello everybody. I am trying to build a function that allows the end user to move the interventions of a fertilization plan.

For instance:

PREFLOWERING
product 1
product 2

ATTACHMENT
product 3
product4

MATURATION
product 5
product 6

must be able to easily obtain a different order such as:

ATTACHMENT
product 3
product4

MATURATION
product 5
product 6

PREFLOWERING
product 1
product 2

I imagined it as if they offered us icons to move them up and down.

The tables are referenced parent-child-grandchild.
I have to sort the RIGHE PIANI table (child).

By intuition I assume you need an order column that I entered. Now I would like to understand:

  1. what values ​​do you recommend for [ORDER]?

  2. what expressions can I use so that the user can obtain the described mechanism?

  3. is there any way to get a full table view (parent + child + grandchild)? I would like the products to appear directly in the PIANI_detail_view instead of related_INTERVENTION as in the child detail view

thanks to anyone who tries to help me and I apologize if the subject may have already been dealt with.

The best one I’ve ever seen:

Manual Sorting (Move Items ↑↓ w/Buttons) || Bonus:… - Google Cloud Community

By @MultiTech

4 Likes

@SkrOYC :two_hearts: :growing_heart: :heart: Thanks so much!

1 Like

wow. I will definitely try to implement it !! thank you very much.

any advice for point 3?

  1. is there any way to get a full table view (parent + child + grandchild)? I would like the products to appear directly in the PIANI_detail_view instead of related_INTERVENTION as in the child detail view

Does it have row limits that it works with? in the function “Ref Set | ALL below (PLUS 1)”?

I don’t understand the passage

([LineItemID], concatenate ([Line_Item_Order_Link]. [Related Order_Line_Items])
) + 7.

In case it can be adapted to a variable number of displayed elements?