Use Navigate APIs
Navigation APIs of SAP Analytics Cloud, analytics designer allow end users to navigate from one analytic application to another or to a specific page of a story.
When running the analytic application, an application designer can define which story or analytic application to navigate to, which parameters to use for the target URL, and whether to open the story or analytic application in a new tab or in the current browser, using the following API events:
NavigationUtils {
openStory(storyId: string, pageId: string, parameters ? : UrlParameter | UrlParameter[], newTab ? : boolean): void
openApplication(appId: string, parameters ? : UrlParameter | UrlParameter[], newTab ? : boolean): void
createStoryUrl(storyId: string, pageId: string, parameters ? : UrlParameter | UrlParameter[]): string
createApplicationUrl(appId: string, parameters ? : UrlParameter | UrlParameter[]): string
openUrl(url: string, newTab ? : boolean): void
}
For example, if you want to allow users to open Page 2 of Story_1 when clicking Button_1, and at the same time create a script variable script_var_1 and add it to the URL as a parameter, then write the following script for Button_1:
NavigationUtils.openStory("story_id", "page_id", UrlParameter.create("p_script_var_1", "123"));In the script above, you don’t need to enter story_id and page_id manually. By typing Ctrl + Space , a value help dialog will pop up. If you choose Open story selector, you can go to My Files and select the corresponding story or analytic application.