Skip to Content
Technical Articles
Author's profile photo Hemant Tiwari

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:

  • StoryId
  • PageId
  • UrlParameter
  • 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.

 

Regards,

Hemant

 

Assigned Tags

      8 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Jef Baeyens
      Jef Baeyens

      How can we transport this to production without breaking the url?

      Author's profile photo Hemant Tiwari
      Hemant Tiwari
      Blog Post Author

      Hi Jef,

      While exporting content from your Dev/QA env, you should include all the dependent objects(Story, underlying model, etc). Objects in SAC have unique CUID which remains constant after importing into new system, so if you transport all the required object IDs in Production, URL should not break.

      Regards,
      Hemant

      Author's profile photo Jef Baeyens
      Jef Baeyens

      Thanks Hemant!

      Do you also know how we can open an application from a story without url breaking?

      Author's profile photo Hemant Tiwari
      Hemant Tiwari
      Blog Post Author

      You can try to pass the Analytics application link as external URL from story.

      For more information on hyperlink from story, please check below link:

      https://blogs.sap.com/2020/04/30/sap-analytics-cloud-hyperlinking/

       

      Regards,

      Hemant

      Author's profile photo Sainath Kumar
      Sainath Kumar

      Excellent thank you for sharing .

      Author's profile photo shahnawaz alam
      shahnawaz alam

      Excellent blog!!

      Author's profile photo Emanuel Schellner
      Emanuel Schellner

      Hi Hemant, this was helpful but the API has changed - model is not needed anymore. It would be even nicer if the code samples were in text format instead of a screenshot.

      Author's profile photo Savith S
      Savith S

      Hi Hemant,

      Copying the Page ID from the URL is not the best way. It is not a static one, also it may cause troubles due to Cache mechanism.

      always use the Number to identify pages. for example:

      pageId="2" will open the second page of story. you can directly pass the values in this way.

       

      Regards,

      Savith