In the example from @georgecollier it is not always true that step 2 will always run after step 1…what is true based on the screen shot used in the example, is that step 2 will always trigger after step 1 has been triggered, but nothing in that example screen shot demonstrates how to actually ensure that step 2 will always run after step 1…in order to do that, step 2 needs to take a value from step 1 using ‘result of step 1’, which can be the new version
Custom triggers will make it so that all actions in that custom trigger will complete before other actions from the original series get triggered. For example, original series is step 1, step 2 (trigger custom), step 3 and the custom trigger has 5 steps…all 5 steps in the custom trigger will complete before step 3 from the original series is triggered.
Also, when using result of previous step in a subsequent step as a data source or condition, will cause the subsequent steps to ‘know’ the result of previous step even if that previous step has not competed, so Bubble smartly maps the correct values.
Also, if you want to avoid race conditions, you can use the app API to do bulk create things, take the result of that API call which is the list of unique IDs of all data entries created via that API call and then run the action to update the data field of the other data type, that data field being the list of related things…at least that is the most optimal way to do it, but you’ll find a lot of discussions on the forum for other ways to achieve similar results in terms of avoiding race conditions.
1 Like