Subitem coded order like with Drag and Drop?

HI,

I built a complex logic and/or/serial tree that works great but is there a way to order the items of a table by code like it is done by drag and drop of subitems? I don’t want do visually sort a table i need the real ordering as I calculate the order with Find(thisRow,thisRow.Parent.Subitems)

When I create new Lines in this table and set parent it is generated in the right “folder” but it is attached at the end of the folder. I need to insert it in between of rows.

Any idea if this is possible? Internally Coda must store some kind of sort id at drag and drop changes it permanently…

Best,

Chris

Hey Christoph,

It’s not clear to me what you are trying to achieve. Could you share a dummy doc?

Guide: How to share your doc with the Coda Community - Showcase / Tips and Hacks - Coda Maker Community

If you don’t actually want to drag and drop items, why don’t you define some sorting column so that each items is shown in the desired order?

Hi,

Sorry for my english. The project ist very complex so hard to share but I can simplify it maybe.
I don’t want to sort by any column. This changes just the display of the row but not the real order internally. drag and drop changes the real order. my goal is to maintain the drag and drop ability but be able to change the internal sorting. Why?
It is a project task tool with kinda todos which have to be made in that order. There are estimated end calculations and also or conditions but to keep things simple it is relevant that the item knows which item is its prev. item. sorting a column does not change this order. The find command gives me the correct order which drag and drop represents regardless of the visual order.
Now if I wand to insert a new todo exactly in between two tasks it is not possible as the add row (even with parent for subitems) adds it at the end of the list. you can drag and drop it to the right place yes but then the client needs to insert it and uses the drag and drop. as the tree has more than 30 items drag and drop causes a lot of problems. so simply inserting it in the right place would be needed.
To insert a self made “counter” on each item would be a pain, as you would need to change every counter above the item you inserted (I think they must do something like that internally on drag and drop)

I know its complex but maybe there is a solution?

In this post I shared a way to simulate drag and drop with buttons, maybe that can help you in your use-case

Feel free to copy the doc and explore the formulas and let me know if you have questions.

Hope this helps,

Pablo

1 Like

Thank you very much! Your example is advanced and creates an order number dynamically. well done… you don’t use the internal hidden row sorting but your own. That could be possible to do for my stuff as well but with subitems it gets even more complicated… its a pitty that we don’t habe access to drag and drop like reorder…

2 Likes