Occasionally I lurk over at the OTN Discussion Forums, and the Business Intelligence Suite Enterprise Edition one in particular.
Today I saw a question on passing a dashboard prompt value between dashboards and not knowing the answer I decided to spend an while (I have a day off to day) on coming up with a solution (or two) and at the same time improve my OBIEE skills.
When you create a dashboard prompt you are given the option to specify the scope of the prompt as "page" or "dashboard" , but nowhere can you define a larger scope, even setting the prompt to populate a presentation variable is not much help as they too share the same scope.
In the end I came up with two ideas. The first is not very elegant, but does work, the second much more elegant, needs some work in the RPD, but getting to do what exactly I want has eluded me for now - so if I have missed a trick on this just post a response
Idea 1. Create a navigation link to the target dashboard and use the link to pass the parameter.
One of the common tasks in OBI reporting is to create navigation links from request to another, or from a request to a dashboard. We can define links to OBI objects by browsing them from the GUI or by typing in the URL directly. As well as accessing external websites (like linking to Google.com from a navigation link) we can also enter the URL of a OBI request or a dashboard, but here the excellent news is that we can also pass parameters to the object - and in the case of a dashboard we can supply the default value for a dashboard prompt. So on our second dashboard we need a dashboard prompt to accept the value and the reports to act on it. The first dashboard needs the prompt to populate a presentation variable and a narrative request to generate the link URL. This need only be a simple request that ideally returns very quickly, the key thing is to have dummy columns to report the value of each of the presentation variables to be passed. In the narrative editor we check the HTML Mark-Up check box and it the text edit window the URL of the dashboard and the parameters to pass - we need to specify both the target column and the value to pass; something like this:
href="saw.dll?Dashboard&PortalPath=/shared/Paint Demo/_portal/D2&Action=Navigate&col1=Customers.%22Customer%20Name%22&val1=%22@2%22">Link to Dashboard 2
Where @2 refers to be result of the second column of my request, in this case the presentation variable as displayed in the report. Of course you will need to wrap the code with correct tags <a tags and watch out to escape the double quotes and spaces in the url.
Idea 2 I could not get to work; the idea here is to use a session variable to pass the parameter. I created an updateable session variable in the repository and created a simple report to display the presentation variable from the prompt, but in this case I went to the advanced tab of Answers report and added some pre-query code to update the session variable with the contents of the presentation variable - this seemed to work - but the second dash board did not see the the change in variable even though it was in the same session... oh well it almost worked.