on 2023 Jul 17 4:40 PM
Hi Experts
I created a model parameter for eg on company code (CC_1) parameter.
in AA, how to read that parameter value and set it to script variable ?
Thanks
M
Request clarification before answering.
malya_7
I am not sure what you mean by model parameter, if you mean model level variable then you can use below API
after adding a table (just to bind the datasource)
var ds =Table_1.getDataSource();
var sel =ds.getVariableValues("VariableID");
console.log(sel);
Variable id is what you define at model level
My model variable value selection was 1
Hope this helps !!
Please upvote/accept if this helps
Nikhil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
malya_7
Your question was how to read the variable value, it never mentioned about filtering any dimension. Once you have the value of the variable in a script variable or normal just used that to filter using the below API
Table.getDataSource().removeDimensionFilter("DimensionId");
Table.getDataSource().setDimensionFilter("DimensionId", VariableValue); //replace DimensionId with your dimension
VariableValue should be value read from variable. Also you might need to specify fully qualified name [DImensionId].[HierId].[MemberName]
Nikhil
User | Count |
---|---|
71 | |
33 | |
9 | |
8 | |
8 | |
7 | |
7 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.