Is there a way to refresh multiple sync table rows?

The documentation here (Approximating two-way sync - Coda Pack SDK) specifies how to refresh a single row - basically, return an object representing the row from your action.

resultType: coda.ValueType.Object,
schema: coda.withIdentity(TaskSchema, "Task"),

Is there a way to update multiple rows? I’ve tried returning an Array, but that didn’t work:

resultType: coda.ValueType.Array,
items: coda.withIdentity(TaskSchema, "Task"),

Hi @Dan_Guberman - Unfortunately the pattern we listed there only works for a single row at a time.

We did however recently roll out (but not loudly announce) a new action formula: RefreshTable(). It allows you to refresh an entire sync table, and can be used in buttons and RunActions() just like other action formulas. One caveat is that it doesn’t work in automations, only buttons.


Thanks for confirming, @Eric_Koleda. I suspected that it wasn’t supported.
I know about RefreshTable(), but it takes much longer to update when a more targeted refresh could be done.

this is why it’s alwasy a good idea to check the community! :grin:

@Dan_Guberman I’ve been in this position before, where I want to refresh multiple rows but not the whole table because it’d take a long time and also because refreshing the whole page at once will hit call limits at the API I’m trying to use.

The way I solved this is to add a conditional in the cells in which I call the API and make them dependent on a toggle row. So if the toggle is true, the formula will call on the API and display the result and if it’s toggled off, it would display blank.

Then I run an automation with a FormulaMap() that toggles off and on immediately the desired rows (according to a filter). In practice it results in updating just the rows I want to.

I know it’s hacky but it’s been working well for me.