Passing an additionalScope param to a query's onSuccess / onFailure handlers

I'm having a hard time determining what the syntax is to pass a query's additionalScope param(s) to its onSuccess/onFailure handlers. Here's a visual:

If this is still a feature being worked on by the Retool team, what's an equivalent workaround?

at this spot:
image
line #9 add:
return rowId

then in the event handler here:
image
for value use qryHandleSaveProductionPayment.data

Alternative:

you can return an object instead so that you can access more than one value and in different events (or the same):

return {
  row_id: rowId,
  other_data: "foo bar"
}

then the event handler value would look slightly different:

qryHandleSaveProductionPayment.data.row_id

That did it! Much obliged. I suspect onFailure won't be much different.

1 Like

Yup, it'll work the same way :beers: