cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Data Analyzer URL Parameter

Rui_Varela
Product and Topic Expert
Product and Topic Expert
0 Likes
5,459

Hi SAC experts,

I would like to know if it's possible to pass filters to Data Analyzer from an Analytical Application. I'm using the NavigationUtils.openDataAnalyzer API but without success.The model is the same in AA and DA but believe doesn't matter.

I know how to pass filter values from AA to a Story and AA to AA but even simple parameter such as embed mode as been difficult.

Below one example of my code, I have tried only 1st parameter, only 2nd parameter and both parameters.

NavigationUtils.openDataAnalyzer('&/dz/9102B879DBA6EE5C878C23D8A9E21EF',undefined,[UrlParameter.create("Country/Region","Germany"),UrlParameter.create("mode","embed")]);

Also, is there any documentation of URL API for Data Analyzer? like this one for Story SAP Analytics Cloud URL API

The behavior I want to replicate is the one we get when we open a Data Analyzer from a table in the new Optimized Design Experience Story, where the filter values are passed to the Data Analyzer (Image attached).

Thank you for your time.

View Entire Topic
KoSAC
Discoverer
0 Likes

There are two approaches that can get this done:

1.- Opening the Data Analyzer without creating a Data Analyzer story ( the best way 😞

NavigationUtils.openDataAnalyzer("&/dz/?dataSourceName=".concat(Table_1.getDataSource().getInfo().modelId).concat("&systemType=MODEL&f01Dim=P_ACCT&f01Val=CS_CONTROLLING_STRUCTURE"));

Above line makes it dynamic no matter which source you are using, only replace Table_1 for your table on the story to pass the datasource. The first part of the parameter string I got it from another contributor :

"&/dz/?dataSourceName=".concat(Table_1.getDataSource().getInfo().modelId).concat("&systemType=MODEL"

then you can see you can concat the parameters passing same way as you do for stories:

&f01Dim=P_ACCT&f01Val=CS_CONTROLLING_STRUCTURE"

2.- Opening a Data Analyzer already created story passing parameters to it :

var urlParameters = ArrayUtils.create(Type.UrlParameter);

urlParameters.push( UrlParameter.create("f01Dim", "VERSION"));
urlParameters.push( UrlParameter.create("f01Val", "public.2024_PLAN_ISR_1"));

NavigationUtils.openStory( "CB3A9F013593C6D688AC99F1A244ECA5", "a31b3cd2-f023-4b22-ac46-3e90b81c8e7a", urlParameters, true);

where

CB3A9F013593C6D688AC99F1A244ECA5 = story ID

a31b3cd2-f023-4b22-ac46-3e90b81c8e7a = page ID 

you can get both above by hitting Ctrl+Space when writing the sintax line and the system will help you select the Data Analyzer story and get both Ids automatically.

 

Hope this helps.

 

 

 

 

ekov514
Explorer
0 Likes

For anyone that need to pass a parameter into data analyzer for a dimension that has a hierarchy, here is an example of the encoding that need to be passed as f0xVal (2 values at different levels of a hierarchy:  

%5B%22[dimension].[H1].%2526[value1]%22,%22[dimension].[H1].%2526[value2]%22,%5D

H1: this is the ID of your hierarchy

%5B = [   

%5D = ]

%22 = "

%2526 = & (has to be encoded twice)

To implement this, what I did was to extract values from a story filter or an input control into an array and replaced the ampersand by %2526 and then concatenated into a single string to be passed into f0xVal. 

 

Simtcha
Advisor
Advisor
Hello colleagues, I have managed to add 2 values "EMEA" and "EMEA North" for one dimension like this (with help of html encoding for double quotations and square brackets), if it helps anyone. So it's: NavigationUtils.openDataAnalyzer("&/dz/?dataSourceName=".concat(Table_1.getDataSource().getInfo().modelId).concat("&systemType=MODEL&f01Dim=Geo_Level_1_Region_Description&f01Val=%5B%22EMEA%22,%22EMEA%20North%22%5D&f0p=in"));