Detect when row add and all ref row adds are synced

I have a single Google Sheets file with a set of many-to-many relational sheets linked by association tables. I want to trigger a script when my AppSheet app writes the primary row and all related rows to the sheet.

My initial approach was to trigger the script when a new primary row is added. Iโ€™ve since discovered that the order in which AppSheet inserts the ref rows and primary row (or the order in which Apps Script detects those changes) is random/unpredictable, so I have no easy way to know if all related data is present in the sheet before executing my script.

My new approach is to hopefully have the AppSheet app write a โ€œtransaction completedโ€ row for the main record to a data transaction log sheet, after the main row and all related rows are inserted, and then trigger my script when that transaction log is added. Is this feasible (e.g. can I create an AppSheet event/action triggered when a row and all its ref rows are inserted to the sheet)?

0 1 99
1 REPLY 1

Steve
Platinum 4
Platinum 4

See _ Sending Email Only After Adding a Parent Record and All of Its Children_ here:

Top Labels in this Space