Parameter passing in SAC Analytics Designer
In this blog post, I will provide a step-by-step process to pass user selected multiple dynamic data values as story filters from SAC Analytics Designer to Story.
To demonstrate this, we have 2 cases:
- USE CASE 1 Overview: Choose a model used in the story, any dimension from that model and any number of the members of the dimension selected and pass your selection to the story as story filter ( also mention if you want to include/exclude your selected members).
STEPS WITH SCRIPTS AND EXPLANATIONS:
Let us say, we select Business_Unit from the list of dimensions, then the checkbox gets populated with the members of the selected dimension i.e., Business_Unit, we can select the desired members and provide input as y/n (include/exclude the selected members). On clicking the button “Passing the value selected as story filter”, a story opens with our selections as the story filter. In this case, the story has excluded the Business_units A and B, and it has a story-defined story filter Company_Code.
d) Click the button “Pass the value selected as story filter. The following story opens up in a new tab.
f) We can pass more than one set of selection as story filter. In this case, we are passing one set of selection.
g) The scripts used for Dropdown, Checkbox, Input Field and the Button are as follows:
- Based on the dimension selected in the dropdown, the checkbox items will be populated. The dimension ID is stored as myKey and passed as an argument in openStory().
- Based on the selections in the checkbox, the string “myString” is calculated which has to be passed as an argument in openStory().
- Here, input is the parameter used to include/exclude the user selections.
- Finally, passing the arguments myKey, myString and input in openStory().
STEPS WITH SCRIPTS AND EXPLANATIONS:
We are creating a hyperlink to pass filter value from SAC Analytical Application chart and jump to story by using selected dimension as filter data point.
b) On clicking the button “Apply selected values as data filter point”, we can jump to the story with story filter Business_Unit=A+B.
c)The scripts for Chart selection and the button above are shown below.
- Here in Chart.onSelect(), we are searching for the dimension used in the chart, i.e, Business_Unit in the chart selection sel. If the selection matches, we are storing the values of sel in a string array members.
- On clicking the button “Apply selected values as data filter point”, first we are removing duplicate values from the array members. In the next part of the script, we are formulating myString2, which is passed as an argument in openStory(). The whole script is given below:
- The button “Apply selected values as data filter point” opens the following story with the user selected values as a new story filter:
- We can use any widget (table/chart) to achieve the same result.
Points to be remembered:
- Every filter passed to a Story from Analytic Application act as a Story Filter.
- Page-Level Filters cannot be passed.
- Other selections like Input Control cannot be passed.
- If there is any existing Story Filter for the dimension that we pass in URL, then the value is overwritten.
- Analytics Designer automatically URL encodes the parameter values passed using NavigationUtils.openStory().
- Apart from using Navigation Utility function, we can also use the same URL parameter format when we embed a Story within an HTML page or even within an Analytic Application using the Web Page widget.
- A last argument false in openStory() will open the Story in the same browser tab. By default, the argument is true.
REFERENCES – Navigation Utility in SAC Analytics Designer:
SUMMARY – This was a step by step guide to pass user selected MULTIPLE data points as story filters from analytical application to story and link the two using scripting.
Hope this blog post helps.
Thanks for reading !!
Hello and thank you for the explanation
i have one question, could you explain to how did you get the model id as t.d.C9KR6V....
Thanks in advance