Skip to main content

Run Query

The Run Query action fires a query when an event occurs. Use it to load or mutate data in response to user interaction — for example, running a query when a button is clicked or a form is submitted.

Configuration

ParameterDescriptionDefault
QueryThe query to run
DebounceTime in milliseconds to wait before executing the actionEmpty (no delay)
ToolJet - Action reference -  Run Query

Triggering via RunJS

queries.<queryName>.run();

or

await actions.runQuery('<queryName>');
info

When triggering a query using queries.<queryName>.run(), you can optionally pass callback function handlers to handle success and failure states programmatically. See Callback Functions for details.

info

For a full quick-reference of all actions' RunJS syntax, see Run Actions from RunJS.