How to use a form event action to add a row to another table on form adds, but not updates

Hello friends, I’m trying to change a good ol’ change data workflow that adds a new row to a child table when there’s a new entry in the parent table with a form event action that does the same, but since the form event triggers on adds and updates, im guessing i’m going to need a condition on my event action in order to stop it from running when updates happen.

Any tips for that expression? I have tried using a basic ISBLANK([Related childs]) but it does not run on adds, so i didn’t even test it for updates.

I haven’t used non-navigation form event actions before, am i supposed to see the result inmediately after saving the form, like with regular actions?

You could try following approach.

Please add a hidden “ChangeCounter” type column called say [AddRow] in the parent table with an initial value of 0.

In the “add a new row to another table using values from this row” event action’s condition, please add a condition [AddRow]<=1

This will make the action fire only once on add row to the parent table.

3 Likes

That’s brilliant @Suvrutt_Gurjar, i’ll give it a shot, thanks !

3 Likes

Hello again @Suvrutt_Gurjar, i gave your solution a shot, i didn’t even know “ChangeCounter” columns existed haha, i set up the simple action behavior condition to [AddRow]<=1, but it seems the action still isn’t running at all, after adding the record to the parent table the [AddRow] column value is 1, so it should have ran.

1 Like

Hi @Rafael_ANEIC-PY ,

I can share the test app I built while responding to your query. Could you please DM me the email ID at which I can share the app?

2 Likes