@philledille No problem at all! The up/down buttons approach you have is probably better for capacity reasons! Just incase youâd prefer drag and drop, I duplicated my previous demo and modified it so its only drag and drop:
Preview:
Editor:
In this example, both repeating groups display CarOrders (to make the drag/drop process more simple) and the CarOrders on the left-side can be dragged and dropped between cells:
This happens because of this workflow:
This looks complicated, but it is just telling Bubble, âWhen any of the Drop Area Listed CarOrder elements (found in each cell of the left-side repeating group) have any CarOrder Group dropped on itâ â do the following:
-
This changes the âCurrent Workflow CarOrderâ's Order field to be the Order of the cell where it was just dropped. (The âCurrent Workflow CarOrderâ refers to the Droppable CarOrder group that was just dropped) -
This second action adds 1 to all of the CarOrdersâ Order fields, that are beneath the Current Workflow CarOrder. This makes sure those CarOrders âmove downâ to make room for the CarOrder that was just dropped, and keep everything in order. -
This third action subtracts 1 from all of the CarOrdersâ Order fields, that are above the Current Workflow CarOrder. This makes sure that those CarOrders âmove upâ to make room for the CarOrder that was just dropped, and keep everything in order.
Aside from dragging and dropping between cells, those âCarOrdersâ can then be removed, or âdragged-outâ of the left-side list to the right-side list of CarOrders:
This happens because there is a DropArea on the right side as well, and when a Draggable CarOrder group is dropped on it, the workflow sets that just-dropped CarOrderâs Order field to empty.
Since that CarOrderâs order field is now empty, it is shown in the right-side repeating group only:
And the right-side Cars can be moved to the left by dragging them between those cells as well:
Since both repeating groups are of type âCarOrderâ now, the CarOrders on the right can be dragged between CarOrder cells on the left, all using the same original re-order workflow:
The reason itâs probably not the best idea for large lists is because it uses two âMake Changes to a List of CarOrdersâ each time something is dragged between cells. This is needed to make sure the cells above the just-dropped cell move upwards by 1, and the cells beneath the just-dropped cell move downwards by 1 (If anyone knows of a different way, please let me know! )
Dividing by 2 for drag and drop sometimes works, but it can also cause a few cells to have the same Order number which makes things look like the drag and drop doesnât work.
Here is a more in-depth explanation of the drag-and-drop workflows I used for this example but feel free to let me know if you have any questions setting it up