Hyperlinking SAC Analytic Application to Story by dynamically passing selected dimension value as a filter
While creating a hyperlink from story to another story/page has a straight forward option, having hyperlink to pass a value from SAC Analytical application to story requires scripting.
Navigation Utility function openStory() in SAC is an argument in Analytics Designer Application script that enables you to pass selected dimension value from a widget to a Story as a filter.
Openstory() navigation utility function requires 4 argument values:
- Boolean for newtab (true or false)
Below are the steps of finding argument values:
Step 1 : Finding Story_Id and Model_Id
Use below link to get the list of all stories along with underlying models
https://<tenant>/api/v1/stories?include=models; After the above link is open; you can search for the required Story name and then find the whole ID of the story and model including the package_name.
Step 2 : Finding Page_id
Open the story and navigate to the page you want to Jump to from Analytics Designer and in the story URL you will be able to find the Page_Id
Step 3 : URL Parameter
Filter parameters need to be arranged with all the IDs and then passed as an URL parameter. The following list shows the type of parameter :
Model ID – Found in initial step
Dimension ID – IDs of Dimensions can be found within Model Summary when you open a model or when you hover over the dimension within Builder panel while creating a Story
Filter Value – Store the selected value in variable and pass the member id
Include / Exclude – It is an optional parameter to include or exclude the filter value
Step 4 : Set Boolean for Newtab
It should be true for new tab else false
Now once all Ids have been found, in Analytics Designer Application, open the chart scripting dialogue window (onSelect) and write the below code:
Run the Analytical Designer Application and select the value from the chart which should be passed to the story dynamically
Example: We are passing Meter_Type : Gas Meter as dynamic value:
Notice when the story is opened, value selected is passed as filter to story:
Conclusion : This way we can create a hyperlink to pass filter value from SAC Analytical Application chart and jump to story by using selected dimension as filter data point.