SAP Analytics Cloud allows you to create interactive dashboards and automate actions using scripting. A common requirement is to pass values selected in dropdowns directly into a Data Action. This guide walks through how to link dropdown inputs to Data Action parameters using scripting.
Step 1: Create the Data Action
Example: Let’s assume your Data Action uses 1 measure and 1 dimension.
Step 2: Set Up the Story
Step 3: Set Up the Data Action in the Story
4. In the Detail section, assign the data action you created earlier.
Step 4: Add a Trigger Button
var pVersion=Dropdown_1.getSelectedKey();
var pMeasure=Dropdown_2.getSelectedKey();
DataAction_1.setParameterValue("TargetVersion",pVersion);
DataAction_1.setParameterValue("measure1",pMeasure);
if(DataAction_1.execute()){
Application.showMessage(ApplicationMessageType.Success,"DA run succesfully");
Application.refreshData();}Step 5: View Mode and Execution
Conclusion
By using scripting in SAC stories, you can efficiently pass dropdown values into Data Actions. This approach makes your dashboards dynamic and user-driven, enabling better interactivity and automation.
This pattern is ideal for what-if scenarios, scenario planning, or on-the-fly calculations based on user inputs.
Try adapting it to your own use cases and streamline the planning experience!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 32 | |
| 29 | |
| 19 | |
| 19 | |
| 18 | |
| 17 | |
| 15 | |
| 12 | |
| 10 | |
| 10 |