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

passing prompt values from a story to a data insight

JBARLOW
Active Contributor
0 Kudos
295

Hi all,

I don't know if I'm overcomplicating things, but I can't for the life of me get a working script to pass variable values from a story to an insight.
The story consumes a live model using the same BW query as the Data Insight - ergo the prompts are identical.
I simply want script in a button that will launch the Insight and pass the calendar prompt values to the insight....
Needs to be dynamic as the story prompt values obviously may change at each refresh.

JBARLOW_0-1759936726623.png

Any help much appreciated as I fear I'm going down complex script rabbit holes.

 

Accepted Solutions (0)

Answers (2)

Answers (2)

Ivan_Camac
Participant
0 Kudos

From your screenshot, it looks like you want to pass a range to a variable value. This is not currently possible with URL parameters. There is an Improvement Request to implement this, which has been accepted, and the last update is that it will come in the Q4 release. 

For now, you can only pass single values or multiple values. Depending on what you are trying to achieve exactly, and what control you have over the solution, you could adjust your BW Query to rely on separate From and To variables. You could also perhaps build an array of dates for the full range and pass these as multiple values, but it is not very scalable, and you may rapidly run into URL character length limits or related problems.

The best workaround for now, if you just want to open the query in Data Analyser (not specifically a saved insight) would be to call the openDataAnalyzer() method on a table using the live model in your Story. This will pass the range variable values to data analyser without you needing to script anything else. The drill state of the resulting insight will mimic the drill state of the table in the story, and all variable vaules as well as filter values will be passed also. It also passes the context, so if the end user saves an insight from the resulting data analyser view, they will also have the option to Save and Pin the insight to the source widget, so that they can come back to it again directly from the same story (pinned insights are user-specific, users will only see their own pinned insights).

If you wanted the insight to be in a different navigational state, then you could use a hidden table with a pre-configured navigation state, and call openDataAnalyzer() on the hidden table.

Cheers, Ivan. 

N1kh1l
Active Contributor
0 Kudos

@JBARLOW 

Remember discussing this on thread sometime back but not sure if it's the below one.

https://community.sap.com/t5/technology-q-a/data-analyzer-url-parameter/qaq-p/12742452

 

Nikhil