Hello,
I have a table that depends on manual sort in order to function according to my needs.
But I need a way to add a row in the middle (for example, above row 11) via a button.
How can I do that?
Thank you!
Hello,
I have a table that depends on manual sort in order to function according to my needs.
But I need a way to add a row in the middle (for example, above row 11) via a button.
How can I do that?
Thank you!
I donāt think thatās possible.
The only way Iām aware to do something similar is to set some sorting that fulfills your needs and then use a button to fill in the data to appear where you want it.
If you share a dummy doc we can probably advise you on how to do that.
Got it, I was hoping there was a workaround for this, even via the API, but I havenāt been able to find a solution. Iām familiar with using sort as a workaround, with an approach very similar to this: Use button to insert row below current row. I was just hoping there was some hidden trick I could leverage.
Iāll stick with sorting or change my approach then. Thank you so much for taking the time!
Hi Ford,
I do not know whether this will work, but have you tried duplicateRow()? When you manually duplicate row, it creates a row below the current row. If youāre lucky, it will work the same way when you use the formula.
In any case, here is some background on the various sequences in a table in Coda:
Enjoy
Rambling Pete
Brilliant idea! Unfortunately, I just tried it, and duplicateRow() behaves differently from right-clicking on a row and choosing āDuplicate.ā In the first case, the row goes to the bottom. In the second case, itās created right below the current row, as you said.
This difference breaks the logic of the column that uses the formula thisTable.Find(thisRow)
Hereās a dummy doc. Iāll keep trying to play with it so see if I can find a workaround. Thank you!
Try giving the row a sorting number and letter when is created (different that rowID).
Hello @Cristian_Nichifor ,
Can you be a bit more specific or show us a sample of your āsolutionā. If I understand correctly what you have in mind, I canāt see this type of numbering/lettering solve this when adding multiple records (with a button or automation), but I would love to see this working in a demo doc.
Greetings, Joost
Sorry for the late reply. I apologize I dont think I understand your approach. Wouldnāt that require the table to be sorted? My goal is to preserve the ability to manual sort via drag and drop.
If you want to avoid the automatic sort then the only way to achieve inserting a row is deleting half of the table, adding the row, then adding the half back
With pseudo code you could do something like this
You can also use a similar approach to this, it allows manual sorting with buttons instead of drag & drop.
Thank you @Rickard_Abraham and @Pablo_DV. Iām aware of your approach @Pablo_DV, smart system, but I was looking to preserve the manual sorting experience for workflow reasons. I will go with something similar to what was suggested by @Rickard_Abraham .
Thanks to everybody for taking the time. I really appreciate it!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.