cancel
Showing results for 
Search instead for 
Did you mean: 

How to update input Control values through Script looking Filter Panel Dimension member Values

Vasu_Sac
Participant
0 Kudos
1,179

Hi

I have Story Filter Panel and page input controls in my planning story. I am looking to update input control dimension member values to update based on user selection of Story Filter dimension.

Ex, Filter Panel having Country Dimension and Input Control having Sales Org Dimension.

If GB country selects, Sales orgs should update SG1, SG2.

If FR country selects Sales orgs should be SG3, SG4.

I checked Filter Panel and it doesn't contain any script events. and Input control only having On Select Event.

How to script this and which events to write. 

Regards,

Vasu

Accepted Solutions (0)

Answers (2)

Answers (2)

Ilya_G
Explorer
0 Kudos

try to read Country story filter like this:

Application.getFileDataSource("modelID").getDimensionFilters("dimension")

next you can write IF statement for different values of the countries and set the corresponding filters to Input Control

InputControl_2.getInputControlDataSource().setSelectedMembers()

or directly to orgs in the charts using this

Chart_1.getDataSource().setDimensionFilter()

But if your Chart_1 always has country = #, then it will not work as you have filtered this in the filter panel to GB or FR, so I would suggest you to use the selection of the Country in an Input Control configuring Linked Analysis setting for it to work for selected widgets only, and next reading a Country from this InputControl using this:

InputControl_1.getInputControlDataSource().getActiveSelectedMembers()

akhilgs
Explorer
0 Kudos

Hi @Vasu_Sac 

If the sales org & country dimension are present in the same model then the cascading effect of the story filter will automatically filter all widgets in all the pages including the input control. But if these are not in the same model and if your story has two source models, try model linking, this will allow to filter data from both the models(story 2.0 supports just filtering as of now), the only thing needed is a common dimension that is used in both the models or if there are no common dimensions then you have to apply some scripts.

As you said there is no direct way to get values of the story filters via script, but you can access them indirectly by adding the same filter as a page filter, as in if country is a story filter, add that as a page filter, then use scripts to get the selected values and just hide this filter so that for end users this filter is not visible and you will be using it just to get the selected values of the story filter.