I have 5 buttons that trigger the same query, and I want to do different things based on which button was clicked
break me out
Specifically, you would use triggeredById inside a JS query. That will give you the name of the component that triggered the query.
@coleca's solution seems great, it'd just be nice if this was natively supported from the UI so there could be autosuggestions.
Would be really great, so you can make more generelt and reusable scripts
+1 on this
I would suggest to create a temporary state.
For every button, you can make an action to set up the value of the temporary state.
Give the temporary state argument to the query.