So I’ve got 2 tables I am using for a tracking document for my business. Because the larger a table gets (1000+ rows of tracked items) you get significant slowdown when adding any new rows to the table, I am employing a system when I move any already Invoiced items from the Master Table to the Archived Table. Imagine a setup like this.
With the help of some excellent Coda staff I’ve already figured out a way to set an automation to automatically move any rows that have their status switched to invoiced from the Master Table to the Archived Table by essentially copying each column one at a time then deleting each column one at a time. That looks something like this:
However, when invoicing a few hundred tracked tasks at once the system slows up quite a bit and what I’d like to do is swap all my tasks from completed to invoiced, then at my own leisure, press a button and let coda sit for a few minutes while it copies all my lines of data from one table to the other. Yes I could also manually select all the invoiced rows and copy them and then paste them… I know… I know… I want to make a button do it.
So here’s what I’ve tried. First I made a button that adds the last invoiced item:
Then I’ve made a button that deletes the last invoiced item:
Then I’ve made a button which runs the first two buttons together:
BUT, this only does one line at a time. BOOOOOO.
What I want is some sort of For Loop. I’ve been looking at Formula Map but I have no idea what syntax to use to accomplish this goal. This for example adds two copies of the last line at once (since two items were marked as invoiced).
What I want is essentially this “for all lines in Master Table that have the status Invoiced, Run the Add Item button, then Run the Delete Item button. Test again. When no lines meet this condition, STOP”
Who’s got some thoughts?