Which Global Action button was clicked?

I am running a snippet from a group of global actions. To dynamically change content, I need to know which one was clicked. I tried I few things unsuccessfully and therefore need the help of the community. Thanks.

Hmmmm … not sure about knowing which was clicked.

I do know that you can set it up such each Global Action runs a snippet specific to it which then runs the snippet you created. In doing so, each of these snippets can pass in a parameter in order to be able know which Global Action was clicked.

See this post by Moshe.

Create a snippet like this to make this work.

var params = arguments[0],<br />$ = skuid&#46;$,<br />snip = skuid&#46;snippet&#46;getSnippet('your_snippet');<br /> snip(arguments[0], "GlobalAction1"); 

Then in your existing snippet you would take this second parameter, which from the above example would be “GlobalAction1” and use it in your snippet.

As an example.

var params = arguments[0], <br />$ = skuid&#46;$,<br />globalAction = arguments[1]; <br />if (globalAction == "GlobalAction1"){ &#47;&#47;Codehere }