Category: How do I do X?

This solution is summarized from an archived support forum post. This information may have changed. If you notice an error, please let us know in Discord.

Multiple actions on click


I am using Appsmith Cloud and want to run an action with variables on click and then another action on its successful completion. I am unsure how to combine these two actions, but someone suggested passing an onSuccess function to the run function with the necessary arguments, which worked for me.


The user wanted to run an action with variables on click and then, upon success, run another action. To combine these two actions, the "run" function with the onSuccess function can be used.

First, the initial action with variables is written using curly braces and passing the variables within those curly braces. For example: {{{ state: “OFF”, queue: “de#issue” }) }}

Then, to add the onSuccess function to also run the second action upon success, the "run" function can be modified. This can be done using the following format: {{ =>, () => {}, { variables... }) }}.

Finally, the user was given an example of how to implement this modification based on their previous actions. The example code was: {{ =>, () => {}, { state: “OFF”, queue: “de#issue” }) }}.