Extra data in query trigger

I want to run two sql queries after an option in an action sheet has been chosen.

I made two retool queries. On the action sheet I run the je code where I trigger these two queries. One of those queries also needs extra data.

Query1.trigger()
Query2.trigger(extra data).

I struggle getting the extra data in the retool query.

Is there an easier way to achieve this?

Can you try query2.trigger({ additionalScope: { foo: 'value' } })? Then you can reference with the variable foo in query2.

you need additionalScope

query1.trigger({additionalScope:{"extradata":value}})

now the variable 'extradata' is available in that query.

RIP i was too slow! But yes, what @bca said!