cancel
Showing results for 
Search instead for 
Did you mean: 

SAC - Passing Multiple dimension members in URL Parameters from Analytic App to Story

former_member40251
Participant
0 Kudos

Hello Experts,

I need help to build a script to pass 2 members of the dimension "Version" in an Analytic App to open a Story URL.

The script is like this:

var param_versao = Text_12.getPlainText(); === this variable comes from a dynamic text generated from "Version" Input Control.

var param_actual = "public.Actual";

NavigationUtils.openStory("E1884C850633E5AC5EF6C39FB76692BC", "6682772f-59cd-46c8-bd15-c215c7249d24",

UrlParameter.create("f01Dim","Version"),

UrlParameter.create("f01Val",[param_versao,param_actual]),

true);

But the script is incorrect when setting f01Val values (cannot convert Array of string to string).

Can anyone help me to convert Array of string to string? Or is there any other option to pass 2 versions for the story filter?

kind regards

Mayumi

Accepted Solutions (0)

Answers (3)

Answers (3)

christophtill
Advisor
Advisor

Hi may24071978_,

you can pass multiple parameter values like described in this documenation: Filter Parameters.

example:

f01Dim=SourceID&f01Val=["02","03"]

To put this together in the UrlParameter.create() method is a little tricky as you need to mask the "-character.

You can achieve this with the backslash before the "-character and write something like this.

NavigationUtils.openStory("<story id>", "1", [UrlParameter.create("f01Dim", "Version"), UrlParameter.create("f01Val", "[\"public.Actual\", \"public.Forecast\"]")], true);

The story filter will show "(All)", but if you click on the filter you should see only the values passed in the filter parameters.

Kind regards,
Christoph

0 Kudos

Hello christoph.tillmann ,

Thanks for the explanation!

Unfortunately it didn't work using the backslash for the filter + variable, which is my requirement (The story is a Plan/Actual comparison report and I need Version Filter = Actual + selected Plan version.

The script is like this:

var planversion = Text_12.getPlainText; //Text_12 is a dynamic text from the Version Input Control

NavigationUtils.openStory("E1884C850633E5AC5EF6C39FB76692BC","6682772f-59cd-46c8-bd15-c215c7249d24",

[UrlParameter.create("f01Dim","Version"),

UrlParameter.create("f01Val","[\"public.Actual\","+planversion+"]")],true);

but it didn't work. Need to know how to combine fixed filter with variable in "UrlParameter.create" script.

kind regards

Mayumi

0 Kudos

Hello all,

We have a similar requirement plus the following:

If the user clicks on one column (Dimension A) we need the new story which opens, to be filtered with the cell value of the dimension A. So far so good. Our script works fine. But if the user clicks on the cell of the next column (Dimension B), we need the new story to open filtered by the Dimension's B cell value. We tried an If else if etc logic but it didn't work.

Any ideas?

Best Regards,

christophtill
Advisor
Advisor
0 Kudos

Hi may24071978_,

you missed the quotation marks around the plan version.

It should work like this:

NavigationUtils.openStory("<story id>", "1", [UrlParameter.create("f01Dim", "Version"), UrlParameter.create("f01Val", "[\"public.Actual\", \"public." + Text_1.getPlainText() + "\"]")], true);

Kind regards
Christoph