Navigating to BI Content in OBIEE11g and Passing Multiple Parameters

July 16th, 2012 by

Hello everyone, I’m Francesco Tisiot a new Rittman Mead consultant, in this post I’ll explain how to achieve custom navigations to BI content passing multiple parameters on Oracle BI 11g and a way to include that functionality in the Action Framework.

First of all, what does a “custom navigation to BI content” mean?

OBIEE developers can associate many actions to every column used in a report (called Analysis in OBIEE 11g terminology). This is done by editing the “Interaction” tab under Column Properties menu. One of the actions available is “Navigate to BI content” and allows to navigate to a Dashboard Page or a Analysis passing the context as parameter. The context passed includes the details of the column clicked on, the value for that particle row and all the prompts applied to the calling analysis.

“Navigate to BI Content” solves the majority of navigation cases, but what happen if you want to navigate to a Dashboard or Analysis passing not only the current column value and context but also filtering for other fields maybe depending upon other column’s value? This is what I call “custom navigation to BI content” and below you’ll find a solution to include it into the action framework.

The solution is based on PortalPageNav and GoNavEx Javascript functions provided by OBIEE allowing navigation to dashboard pages and analysis.

PortalPageNav function definition is the following

where parameters are:

  • Event: event object, should represent the click but is never checked or used by OBIEE
  • Dashboard: Path to the dashboard (/shared/FOLDERNAME/_portal/DASHBOARDNAME)
  • Page: Page name
  • Tbln: Presentation table to filter
  • Coln: Presentation column to filter
  • Valn: Value to filter by

Action Framework

The Action Framework, is an OBI EE component (introduced in version 11g) that provides functionality for creating, managing and invoking actions. These actions could provide functions like navigation to related content or external system calls (e.g. invoking functions, operations or process to external systems).

Actions are created and managed in the Oracle BI Presentation Services user interface and can be included within analyses, dashboards, agents, KPIs, and Scorecard objectives. There are several different types of actions, for example, Navigate to a BI Content or Web Page, Invoke a Web Service, and Invoke a Browser Script.

 

“Invoke a Browser Script” Action

One of the definable actions is the “Invoke a Browser script” that provides a way to initialising a pre-defined browser script (e.g. javascript function) stored in the server, retrieving it, adding parameters and finally executing it in the client’s browser.

In order to include browser script actions in OBI EE 11g Action Framework you’ll need to edit UserScript.js that can be found at:

UserScript.js contains the browser script action definitions and by default it includes several examples of browser scripts.

Every browser action definition in UserScript.js is composed by two parts:

  • A function containing the actual code to be called when the action is invoked
  • A (optional) “publish” associated function containing the parameters definition, used by Action Framework for mapping values to the function parameters.

New functions should use the namespace USERSCRIPT in order to avoid function name conflicts occur with the product code, and to allow the Action Framework identifying functions when creating an action.

You can find all the instructions to include custom Javascript functions in the Integrator’s Guide for Oracle Business Enterprise Edition Chapter 4.

Remember, when migrating or deploying OBI EE to other environments, to copy UserScripts.js in new environments too.

PortalPageNav in Action Framework

The function that includes PortalPageNav is the following:

Basically customPortalPageNav function is creating a string containing:

In order to make it visible from the Analytics Menu you’ll need to add a “publish” function like the below

Once created those functions clear browser cache and restart Presentation Service. You should then be able to use customPortalPageNav function by selecting Column Proprieties > Interaction > Value Primary Interaction > Action Links > Add > New > Invoke a Browser Script

 

And after selecting customPortalPageNav from the menu.

 

You should then be able to edit the parameters

 

The default customPortalPage function contains only one (Table, Column, Value) triple to filter by but you can add as many triples (Table,Column,Value) as you want as shown in the image below.

 

Finally please note that every parameter could be either a Static Value, a Session Variable, a Repository Variable or a Column Value providing the maximum level of flexibility.

That’s everything for now, enjoy customPortalPageNav!

Comments

  1. Nicolas GERARD Says:

    Thanks. Very clear !

  2. Alex Gann Says:

    Thanks for the information!

    We had solved the problem by simply using “Navigate to a Web Page” and then setting up the get parameters. No JavaScript modification necessary and auto-extends to as many coln/opn/valn parameters as needed without having to pre-define the number of placeholders.

    eg /analytics/saw.dll?Dashboard&PortalPath=/Path/To/Dashboard&Page=PageName&Action=Navigate&col1=”Presentation Folder”.”Column”&val1=”@{Param1}”

    Having the ability to pass parameters across subject areas and presentation column names without having to build them under a common business model is a great benefit.

    Thanks for explaining the USERSCRIPT namespace and approach – this was my first time seeing it blogged about.

  3. Francesco Tisiot Says:

    Hi Alex,
    In my experience the solution you use (/analytics/saw.dll?Dashboard&PortalPath=/Path/To/Dashboard&Page=PageName&Action=Navigate&col1=”Presentation Folder”.”Column”&val1=”@{Param1}”) doesn’t propagate prompted filters (coming from dashboard prompts) automatically like the PortalPageNav does.
    But it’s another way of achieving a similar behaviour.

  4. Alex Gann Says:

    Yes – good point. I suppose you could have the dashboard prompt also set a presentation variable (under the column prompt options) and then reference that in the nav url, but by then you may as well be using the userscript approach :)

  5. Fabian Says:

    Hi Alex
    Great to read your post. Custom Navigation is a functionality which I’m missing since OBIEE 10G. And the generation of a url which does what you want is sometimes hard to explain to end users.
    I copied your code and first the function was not being published in my frontend. I guess there’s a little mistake in the publish function name. It should be customPortalPageNav as the base function name is.
    Regards Fabian

  6. Francesco Tisiot Says:

    Hi Fabian,
    Thanks a lot. Yes there was a mistake in the publish function naming. Now should be correct.

  7. Janet Says:

    Hi Francesco,

    I follow all the steps, but the function “customPortalPageNav” cannot be recognized by the system. It prompted this function doesn’t exist. How do I double check whether I put the function in a correct USERSCRIPTS.js file ?

  8. Vikas Says:

    Hi Francesco,

    I have installed OBIEE 11.1.1.5. I tried to follow your post but was not able to find the function “customPortalPageNav” definition in my Userscripts.js file. Please let me know if there are some other Userscripts.js files too or just one.

  9. Toby Says:

    I’ve got the same Problem as the other guys. The function is defined properly but does not appear in the frontend. I cleared the Cache and restarted all Services.

    Can anyone help?

  10. Andy Says:

    When I try the ‘/analytics/saw.dll?Dashboard…’ method, the Action Link does nothing.
    Is there no method of calling the OOTB JavaScript for PortalPageNav in an action link, as opposed to writing your own? Or is calling the OOTB function only possible via a custom column link as in 10g?

  11. Haakon Says:

    Same problem on 11.1.1.6. Everything (apparently) defined properly, but no function in frontend after total clear and restart.
    Is this a version problem?

  12. Evelyn Says:

    This is really a great functionality.
    I only have one question:
    Is it possible referring to a presentation variable as value in addition to the session and reporsitory variable?

  13. Pavan Gupta Says:

    Hi,

    I have created the function and used it for navigation from a analysis to dashboard page, When I clcik on the column(which has action link set with all the 5 parameters, 5triples for column filters), It is navigating to the target report(Dashboard page) but the 3,4,5 parameters of the function i.e, tablename,column and the value are not being passed to the target report in return resulting full data set of the target report.

    Can anyone help?

  14. K Says:

    It doesnt work for me with 11.1.1.6. Has anybody resolved the issue?

Website Design & Build: tymedia.co.uk