cancel
Showing results for 
Search instead for 
Did you mean: 

SAC Dropdown button activating few data actions

Deb_D
Explorer
0 Kudos
138

Hey, 
I need some help with simple scripting in SAC analytics.
I've created a dropdown button with 3 options, and for each of them I have a different data action that I want to activate (having the prompt window popping up)
1. do I have to place those data action triggers in the story? if yes how can I hide them?

2. what is the script I should write down to have it done?

thank you
Deb

 

Accepted Solutions (1)

Accepted Solutions (1)

VijayBhaskaran
Explorer

Hi @Deb_D,

Suppose you want the data actions to execute just by clicking on the dropdown options without having the data action triggers in the story. In that case, you can create "Data Action" script objects which is there in the outline, and assign data action in each object.

VijayBhaskaran_0-1720599070898.png

Use the below script in the onSelect() event of the dropdown.

if(this.getSelectedKey()==="DA1"){
	DataAction_1.execute();
}
else if(this.getSelectedKey()==="DA2"){
	DataAction_2.execute();
}
else if(this.getSelectedKey()==="DA3"){
	DataAction_3.execute();
}

I hope this is what you're expecting.

Thanks and Regards,

Vijay Bhaskaran

 

Deb_D
Explorer
0 Kudos
Deb_D
Explorer
0 Kudos
dear @VijayBhaskaran - thank you!! I did it however it doesn't open the prompt to let me choose the parameters I've build. how can I have a popup window to have my users choosing their CC/date etc? thanks again
VijayBhaskaran
Explorer

Hi @Deb_D,

Currently, if you choose to use the data action script objects, you must fix the parameter values. If you want to open the popup for the data action then the only way is to use the Data action triggers in the story.

Thanks and Regards,

Vijay Bhaskaran

Answers (0)