Multiple actions on click

We´re using Appsmith Cloud and I´d like to run an action with variables on click and additional on success another action.

The action with variables (which is working) is:
{{update_instantcallback_config.run({ state: “OFF”, queue: “de#issue” } ) }}

upon success {{scan_instantcallback_config_de.run()}} should be also executed

How can I combine those two actions?

Hey @peter! The run function comes with two different signatures. Check out this doc that shows you how you can pass onSuccess and onError function - Query Object - Appsmith

Hey,
thanks for the hint, unfortunately I can´t find my examples on those docs.

If I click on onSuccess via Gui the following JS appears:
{{update_instantcallback_config.run(() => scan_instantcallback_config_de.run(), () => {}) }}

Can you give me some hint how or what I have to change?

Try this:

{{update_instantcallback_config.run(() => scan_instantcallback_config_de.run(), () => {}, { state: “OFF”, queue: “de#issue” }) }}

1 Like

@Amelia Thank you, this works :slight_smile: