In Action, can we add a new row in parent sheet, get the id of the newly inserted data and insert that into a new child sheet?

Have a look here:
image

I need to insert row into Event and later several rows into Event Menu Umum … is this possible?

The child sheet should get the parent row id here

sekali klik nambah 2 row di sheet yang berbeda?

yes. English please :smiley:
If only adding several rows, that’s fine. But if I want to capture row id from another newly inserted row… that will be … no idea how

you can, just try it.

but the data entered is not dynamic data, but data that has been inputted in the action settings.

let me know if my statement is wrong

that’s the problem. It need to be dynamic: newly inserted data

You could first create a unique ID into a user specific column, insert that ID into the new row of your parent sheet, then have a relation looking for that ID and retrieve the Row ID through a lookup.

2 Likes

Basically I have the same problem. How to solve this ?

It’s a built in feature now. When a row is added you can write the rowid to any column in the parent table or user profile, and then use it for subsequent actions.

It does not solve my issue since I need to store the row id of a parent row in 6 child rows.

When submitting a form => row id of the parent row is created => I need to add 6 more rows to another sheet with this parent row ID stored

I think that use case was largely the reason the feature was added. You write that parent RowID somewhere, and then refer to it in all of your other Add Row actions.

Does it mean that I have to leave the form component to create the parent row and rather doing it with the add a row action ?

Because I don’t see this feature in a form.

Ah, yeah that seems to be missing from forms. I guess you could roll your own custom form with a separate single row table, some user specific columns, a detail screen sourced from that table, and a submit button that calls a series of actions.

Yes seems that’s the only way. Thanks.

1 Like

If you’re adding those 6 rows using 6 add row actions, I guess you can use the on-submit action of the form and be able to reference the parent row’s ID.

1 Like

@ThinhDinh would you recommend a Wait action before those additional rows are added?

Maybe 1-2 seconds, but I don’t think I have ever had problems with that approach before.

1 Like

I’m still leary about using On Submit actions that refer to a row that was just added, so it’s interesting to know what everyone’s experience has been.

1 Like

Most of my problems with that on-submit action is about set columns, I would still add a wait to be sure, but I tried referring the rowID like I said above and it worked just fine.

1 Like

Good to know. Thanks!

2 Likes

Working fine, thanks a lot !

2 Likes