Hi
How to send parameter values to SAC Data Action from Story Filters.
I have updated parameters with fixed values in script for data action and it is working, But I am looking to get user selected values from Story Filter to pass DA parameters instead of hard coded values.
How to get user selected values from Story filter and pass to DA parameters.
Story Filters:
Please help. Regards, Vasu
Request clarification before answering.
You check this script API to get dimension
var filter = Application.getFileDataSource(modelID).getDimensionFilters(dimensinonID);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @William_Yu1
Thanks for your reply.
I have updated below code and getting error while passing the variable value filter_C to setparameterValue function. If I use double or single quotes, the variable is not recognizing. If I remove quotes, its giving below error.
Application.showBusyIndicator(" DA Executing...");
var filter_CC= Application.getFileDataSource("xxxxxxxxxxxxxxxxxxxxx").getDimensionFilters("CompCode")[0];
switch (filter_CC.type){
case FilterValueType.Single:
var filter_C = cast(Type.SingleFilterValue, filter_CC);
console.log(filter_C.value);
break;}
DataAction_1.setParameterValue("FYMonth_Input",'[Date].[FYP].&[202501]');
//DataAction_1.setParameterValue("CCODE_Input","100");
DataAction_1.setParameterValue("CCODE_Input",filter_C);
DataAction_1.setParameterValue("SalesGroup","SG1");
DataAction_1.execute();
Application.refreshData();
Application.hideBusyIndicator();
I think the parameter you sent is having different type as can be accepted by data action. You need to convert it first.
You may check the example with section 5.35.3.1 of below help doc.
https://d.dam.sap.com/a/3Y16uka/DeveloperHandbookSACAnalyticsDesigner.pdf
| User | Count |
|---|---|
| 10 | |
| 5 | |
| 5 | |
| 5 | |
| 5 | |
| 2 | |
| 2 | |
| 2 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.