I have a modal the allows a user to add an item to (a table that will make it show up in...) a checkbox group. Once the "save" button is clicked, a JS Query runs. The JS Query triggers a JS Query to create the update array. Then it triggers the update query. Then is closes the modal and triggers the query that populates the checkbox group.
The problem is that the last trigger (for the Query to update the checkbox group) runs but doesn't seem to include the newly created record.
I think the query that updates the checkbox group is running before the update query finishes.
How do I get the triggers to complete before the next query runs?
This is what I have currently.
(async () => {
await js_make_staff_to_add_array.trigger({onSuccess:function(staff_data) {update_add_staff_to_area.trigger({additionalScope: {staff_array: staff_data}})}})
await modal_add_staff_to_area.close()
await qry_Area_Crew.trigger()
})();
Thanks