Background
You get data floating in your table (maybe via an external source, like Shopify below) and as a result you have per row a multitude of data, data you want to have distributed over rows (one item per row). The solution in this template is partly based on one I solved in the , partly because I solved it for in a table, while I was working on a solution that works via a button outside that table, that is the second solution. The above is not what you want, you are looking for something like below:
Two Solutions
In this template I worked out two solutions. One with a button in each row and one with a single button outside the table. The latter is difficult, requires a deep understanding of how lists in Coda are composed and is often not required in most situations, I added it mainly to show the power of the Coda logic and as learning for myself.
Solution 1 - buttons in the rows
We add a button at the end of the table on each row and link it to an other table. We treat each list as a combination of items we will split and distribute in the target table. First what happens in a video of 7 seconds if you do not set up the function properly. I show because it could be very well you came across the same issue. On the pages where I explain the functions, I’ll show the logic behind this error. The purple button pushes all the buttons in the table. It looks like one button, but it is one plus many (in the table).
Splitting a row goes wrong.mp4
Splitting a row goes wrong.mp4
526.8 kB
Solution 2 - the all in one button outside the tabel
This solution is gracious, efficient but also superfluous in this particular Shopify case. I created it nevertheless to develop elements I may need in other applications that are a kind of standard in comparable situations: you operate on a table via button outside that table (on the canvas or in an other table). As you open the button, you see that it contains quite some code and all parts work together to distribute the data over the relevant rows.