We are now part of Eviden, discover more...
Blogs / SAP / SAP Analytics Cloud / Application Design / SAP Analytics Cloud – Application Design Series 17 Navigation Utility Options

SAP Analytics Cloud – Application Design Series 17 Navigation Utility Options

Nov 7, 2019

SHARE

In the previous blog in this series, we learned how to use Slider and Range Slider widgets. In this blog, let us look at various options available under the Navigation Utility function.

* * *

Navigation Utility is a function in scripting exclusive to Analytics Designer that can be used to jump to another Analytic Application, Story or an External URL. You can also jump to Data Analyzer where you can analyze data of LIVE BW queries.

Four Types of Possible Navigation

There are four types of navigation possible from an Analytic Application.

  1. Story
  2. Analytic Application
  3. External URL
  4. Data Analyzer
SAP Analytics Cloud – Application Design Series 17 Navigation Utility Options
Navigation Utils Function

In addition to the above four, you also have functions where you can generate URL objects of Analytic Application and Story separately.

1. Open Application

SAP Analytics Cloud – Application Design Series 17 Navigation Utility Options
Arguments of the Open Application Function

The function NavigationUtils.openApplication is used to open an existing Analytic Application. There are three arguments – App ID, URL Parameters and New Tab Flag. The app ID is the only mandatory argument.

SAP Analytics Cloud – Application Design Series 17 Navigation Utility Options
Application Selector

You also get the Application Selector option to help you choose the application instead of manually entering the Application ID.

If needed, you can include the second argument – an array of URL parameters. URL parameters can be passed down to Script Variables of the application that you are opening. Such Script Variables can be utilized in onInitialization() event for various purposes like applying filters or changing views.

Script Variables as URL Parameters

SAP Analytics Cloud – Application Design Series 17 Navigation Utility Options
Exposing Script Variable for URL Parameter

Before you can pass the value to a Script Variable, it must be exposed to the URL parameter. So, when you create a Script Variable that needs to get value from URL, check the option Expose variable via a URL parameter.

SAP Analytics Cloud – Application Design Series 17 Navigation Utility Options
URL Parameter creation

As a next step, you need to include a URL parameter in the Navigation Utility function by mentioning the Script Variable name and value. A URL parameter can be generated using the function UrlParameter.create() which has two arguments – parameter name and value.

Parameter Name is the name of the Script Variable with prefix “p_” and value can be any string. You don’t need to URL encode the value since that is taken care of by the Analytics Designer.

The last argument in the Navigation Utility function is new tab flag which specifies whether to open the application in a new tab or not.

SAP Analytics Cloud – Application Design Series 17 Navigation Utility Options
Example of opening an Analytic Application

In the following example, the Navigation Utility function opens an application bypassing the URL parameter value ‘passed_string’ to Script Variable with the name ‘Variable_1’ in a new tab.

There is also a function where you can generate a URL, save it in any local or script variable and then use it in Navigation Utility function. It will be of great help when you want to populate URL using global Script Function.

SAP Analytics Cloud – Application Design Series 17 Navigation Utility Options
Example of creating an Analytic Application URL

2. Open Story

Opening a Story is similar to application. NavigationUtils.openStory() is the function to use. It has four arguments – Story ID, Page ID, URL parameters array and new tab flag. You can even choose the Story and the default page using Story selector option which fills the Story ID and page ID argument.

SAP Analytics Cloud – Application Design Series 17 Navigation Utility Options
Arguments of the Open Story Function

The only change is the URL parameter. URL parameters can be of three types.

  1. Display Parameter
  2. Filter Parameter
  3. Variable Parameter

Display Parameter is used to configure various display properties like display mode (edit, present, embed), show or hide page bar (only applicable to embedded mode), page ID and language.

SAP Analytics Cloud – Application Design Series 17 Navigation Utility Options
Opening Story with Display Parameter

Filter Parameters is used to create Story Filters. It includes many arguments like model name, dimension name etc. which will be explained in detail in the next blog of the series.

SAP Analytics Cloud – Application Design Series 17 Navigation Utility Options
Opening Story with Filter Parameter

Variable Parameters pass values to variables that are available in the Story. You need to mention the model name, variable name and value as arguments.

SAP Analytics Cloud – Application Design Series 17 Navigation Utility Options
Opening Story with variable parameter

3. Open Data Analyzer

Data Analyzer is used to view data of LIVE query without the need of creating a data model. As of Q3.2019 update, only BW LIVE connection is supported. All four optional arguments are connection name, data source name, URL parameters and new tab flag. Full details of the Data Analyzer will be discussed in another blog down the series.

SAP Analytics Cloud – Application Design Series 17 Navigation Utility Options
Opening Data Analyzer

4. Open URL

The last option is simple where you mention the external URL and the new tab flag.

SAP Analytics Cloud – Application Design Series 17 Navigation Utility Options
Opening external URL

In the next blog, we will learn more about passing filter parameters to a Story.

Click here to evaluate if SAP Analytics Cloud is right for you. To know about the Analytic Applications of SAP Analytics Cloud, please check out our blog series here.


Corporate HQ:
5920 Windhaven Pkwy, Plano, TX 75093

+1 888-227-2794

+1 972-232-2233

+1 888-227-7192

solutions@visualbi.com


Copyright © Visual BI Solutions Inc.

Subscribe To Our Newsletter

Subscribe To Our Newsletter

Join our mailing list to receive the latest news and updates from our team.

You have Successfully Subscribed!

Share This!

Share this with your friends and colleagues!