Hi,
I’m banging my head against the wall, and it hurts. haha. I’m trying to do the following:
-
I have a list of daily logs
-
I want to bulk select several daily logs, and then create one record in a parent table that will have a reverse reference to these child records as a list
-
I don’t want to have to create the parent record first
I’ve gotten as far as linking the child records together with a common ID, but when I try to create a row in the parent table as part of the bulk action process, it tries to write more than one record to the parent table with the same ID, even though I put an expression in the behavior field of the action to look to see if a parent record with a given ID was created. The action fails because Appsheet THINKS a record was created in the parent table with a given ID, but it doesn’t actually write it to the table.
Maybe I’m not understanding the order of operations for Appsheet actions. Below are my grouped action that I’m exectuting as part of a bulk action (selecting several child rows)
Create ID 2 - sets a field in the child rows with a common identifier
Create actual Trip ID - looks for the child rows with the common identifier in the previous action and sets them to another common identifier that I generate with another action and using the input() function, I can give them the same ID that I generate randomly
Select one row to utilize UniqueID to create a row in Trips - In theory this should select one child row to take the “trip ID” field set in the previous action. This “Trip ID” value would then be used to create one row in a parent table called “trips” and would utilize the “Trip ID” value as the unique ID for the row.
I’m finding that Appsheet seems to execute the bulk actions in parallel (based on the row create time that I see in the data table), and it doesn’t allow me to, say write one record to the parent table, and check that a given ID exists in order to use the behavior true/false field on an action to prevent the action from running.
Any ideas how I can go in reverse to create one parent row from a bulk action executed on several child rows? I need this to work in offline situations, so a webhook isn’t an option… I’m confident I could do this with a webhook, but I need it to work in offline situations…
