Sequential execution of triggers

I am trying to get a retool script to execute a few steps in order and they clearly are not behaving the way I want.

The code I am using is

generateShiplistEditJSON.trigger({
onsuccess : APIGatehousePutShiplist.trigger({
onsuccess : APIGatehouseGetShiplist.trigger({
onsuccess : findShiplist.trigger()
})
})

but these do not execute in that order, can anyone point me in a better direction.

David

Hi @David_Mottarella,

You could try with await, which would just be:

await generateShiplistEditJSON.trigger()
await APIGatehousePutShiplist.trigger()
await APIGatehouseGetShiplist.trigger()
await findShiplist.trigger()
1 Like