How to limit action triggered by form save to only if it was a newly added row?

What's the best technique for triggering an action upon form save only when the row just saved was brand new? Is it any of the following techniques? Something else?

  1. I tried making the action the Form view's "Form Saved" event and making the action's "Only if this condition is true" expression @Steve's Is this a new row? technique of testing for the absence of the row's row number in the table. However, as I suspected, it doesn't work--presumably because at the time the action is triggered by the form's View Event, the row has already been created.
  2. It occurred to me that I could instead condition the action on the row having the maximum row number. However, I worry that wouldn't be reliable if multiple users are adding rows simultaneously.
  3. It occurred to me that I could add a column or two to the table with expressions that would tell me whether the row is new and then condition the action on that. @Steven_Aung designed one version of this. If I tried it, I thought I'd use a ChangeCounter column (e.g., if ChangeCounter = 1, it's a new row). However, it seems like overkill, or at least inelegant, to maintain a table column solely to indicate whether the row has been edited since it was created solely for the purpose of limiting an action to running upon row creation.
  4. It occurred to me that I might be able to create two versions of the Form view--one for adding new rows that triggers the action and another for editing existing rows that does not trigger the action. However, that also seems like overkill and, in any case, it would certainly be a hassle to ensure the views remain in sync as I continue to refine that form's design.
  5. What I've done for now is create an automation that does reliably perform the intended action when a new row is added. This is easy and straightforward--but I worry there may turn out to be a daily throttle on automation events.
Solved Solved
1 2 109
1 ACCEPTED SOLUTION

I would switch to an automation based on new entry to the table, rather than action on form save.

View solution in original post

2 REPLIES 2

I would switch to an automation based on new entry to the table, rather than action on form save.

Thanks. That's the best approach that I've found as well. Per my update in the daily throttle on automation events thread, it turns out there's not actually a daily limit; so, that's not a constraint.

Top Labels in this Space