After adding Table A rows via external call to AppSheet API, how best to recalculate Table B rows?

I have a scenario where one table (Table A) has rows added in bulk (1000s at a time) via the AppSheet API being invoked from outside the app. I need to then force recalculation of rows (1000s at a time) in another table (Table B) that has columns with App formulas that reference the first table (Table A).

I'm planning to create an automation whose event is triggered by "Adds only" in Table A. My question is what's the best approach to implementing the data change task to be executed in one column for pertinent rows in Table B that would then trigger recalculation of Table B's other columns?

For example, it's unclear to me which of the following applies:

  1. The automation would be triggered and run only once for all the Table A rows added simultaneously.
  2. The automation would be triggered and run separately for each new Table A row.

If the behavior is #1, I assume that it's far preferable to make the automation task a webhook that invokes the AppSheet API. However, if the behavior is #2, there may not be any performance advantage to using a webhook task instead of just a task that calls a data change action defined within the app since it's going to run one row at a time anyway.

FWIW, the Add records to a table - AppSheet API Help article implies all rows are added before any resulting automation is triggered. See steps 5 and 6 here:

What happens when a record is added?

  1. All fields are initialized to initial values and all app formulas are computed.
  2. The field values you specify in the request are applied.
  3. App formulas are computed and change fields are updated.
  4. Required, Required_If, and Valid_If conditions are enforced.
  5. The record or records are added to the table.
  6. Automation workflows, if any, are invoked.
  7. The added record or records are returned in the HTTP content.

As always, any guidance regarding my questions--or how I should be thinking about this differently--is appreciated.

0 7 196
7 REPLIES 7
Top Labels in this Space