I don’t think (?) I’m saying this is a bug, rather I’m just thinking out loud about the best way to handle a common situation and perhaps looking for a recommendation. I goes like this:
- I have a compound action
- It needs to create a row in a “parent” sheet
- It then needs to create a related row in a “child” sheet
- The relation is achieved by having the child row contain a unique ID referencing the parent row
- This needs to be an atomic operation i.e. both rows need to be added and related correctly
Making the Relation Between Parent & Child
I have used a Single Value column to retrieve the last row in the parent sheet immediately after adding the new row to it. This gives me access to the unique ID so that I can use it when I add the row to the child sheet in order to create the relation.
Setting the Unique ID in the Parent Sheet
Approach 1 - Use a RowId Column in Parent Sheet
In this scenario Glide will automatically add a unique ID into the RowId column when I add a new row to the parent sheet. However I have definitely seen (maybe a while back) a slight delay before the RowId column is populated in the new row. This means that my Single Value column has seen an empty RowId and therefore I have not populated the child sheet correctly and the relation has not been made.
Approach 2 - Use a Unique Identifier Special Value
In this scenario I do not configure a RowId column in the parent sheet, rather just a text column which I call Unique ID. I then populate this “manually” using a unique identifier special value when I add a row to the parent sheet. Experience suggests that this value is always immediately available so that the Single Value column can access it and be used to populate the child row correctly thereby forming the relation.
So my question to you is, are either of these methods equally acceptable to achieve the end goal and have there been any recent (month or so) changes to compound actions that would ensure my previous occassional timing issues are no longer likely (e.g. I see that compound actions now show a spinner, maybe indicating some form of serialisation).