cancel
Showing results for 
Search instead for 
Did you mean: 

SAC Hyperlink using CreateStoryURL & OpenStory to a Story with two linked parameter variables

afgmagalhaes
Explorer
0 Kudos
320

Hello, Somebody has been able to use hyperlinking with Navigation API to filter by variables in stories with more than one model with linked parameters?

If I link to stories with one Model that is fine and works well, but if I have more than one model I am not able to filter. According to documentation, "If you have linked variables, your URL needs to include all the models and the variable details of the linked variables" but I'm doing so. The models are two live BW queries, have the same parameter with the same technical name.

My simplified code:

var current_date = new Date(Date.now());

var year = current_date.getYear()+1900; // 1900 needs to be added

var month = current_date.getMonth();

var last_date_yyyy = new Date(year,month-1);

var last_date_yyyymm = DateFormat.format(last_date_yyyy,"yyyyMM");

var PageID = "5b080591-9363-45c2-945f-37b78779f986"; // Page 1

var StoryID = "6E30908619D37A35DA5F642A9D01244C"; // Story

var URLParameterModel1 = UrlParameter.create("V01Model", "Crgs7a0qmq5m5gmv830u8lsbn2p");

var URLParameterPar1 = UrlParameter.create("v01Par", "ZMESINFORM");

var URLParameterVal1 = UrlParameter.create("v01Val", last_date_yyyymm);

var URLParameterModel2 = UrlParameter.create("V02Model", "C8i3ldbd1rq1gh6geh9s6h2d");

var URLParameterPar2 = UrlParameter.create("v02Par", "ZMESINFORM");

var URLParameterVal2 = UrlParameter.create("v02Val", last_date_yyyymm);

var StoryURL = NavigationUtils.createStoryUrl(StoryID, PageID,[URLParameterModel1,URLParameterPar1,URLParameterVal1,URLParameterModel2,URLParameterPar2,URLParameterVal2]);

NavigationUtils.openUrl(StoryURL);

 

Story opens but variable is unchanged. Any issue with this code? Missing something?

Note: I use V01Model (V in uppercase) otherwise it does not work even with just one model. Documentation refers to v (lowercase) but I have not been able to get any result with it.

View Entire Topic
david3030
Explorer
0 Kudos

Hello, try to use the Full ID of your Model :

if you have as full ID CUBE: t.1:Csl41f4fgb7catr42mr9or03rq then take this part t.1:Csl41f4fgb7catr42mr9or03rq

I always had problems before, but after doing like that everything is working fine.

 

P.S.

Don't use uppercase, do like in the docs.

I hope it helps

 

Regards

afgmagalhaes
Explorer
0 Kudos
How to obtain that prefix to get FULL ID? I get the model ID by opening the model in the Modeler and copy it from the URL. Not been able to find that part on the documentation.
david3030
Explorer
0 Kudos
You can use a little script like console.log(Table_1.getDatasource().getInfo().modelId); Assuming that Table_1 is a table with the desired model.