How do I get a response field into my success event handler

I am looking up a specific entity (lets call it account) through a Rest API and if an account is found, the call should return the account id of the account I am looking for. With this account id, I want to open another app in retool with that id in the url parameters.
I want to open the other app by using the success event handler and adding the key-value pair accountid = response.accountid within the 'go to app' action.

I just cannot seem to find what word to use to extract the response information from the query and use it in the success event handler. I tried data, output, response, this, self, the name of the query, ...

Is it not possible to reference the output of a query in its own success event handler?

Hi @Allys1098,

You should be able to reference it by the name of the query itself. For example, if you've name the query getAccount, in the success even handler you can reference getAccount.data.accountid.

1 Like

I had tried this multiple times this morning and it did not give me the query itself as an option, thank you for helping!

1 Like