Wednesday, March 13, 2013

[OBIEE 10g] Request Variable


Request Variable in OBIEE

A request variable is a variable that is used to temporarily override the value of a session variable. The request variables can be defined in two places of Presentation Services, as my knowledge.

  • Dashboard prompts or
  • SET VARIABLE statement.

A variable whose name should not match that of a repository variable or a security system session variable(USER, GROUP etc..).


Request Variable in a Request : 

We can define Request Variables in any request to override the session variable, using the SET VARIABLE code. When we define a request variable for any request, then the scope and availability of that variable is within the same request. Outside of this request, the session variable will be having the actual value, not the overridden value.

Example :  Assume that there is a session variable called LOB  and someone logged into the presentation services, for this session the value of LOB is 'APD'. Then he can change this value for any particular request using the following steps :

Before request variable, the session variable LOB has the value 'APD'.

To change the value of LOB to the value 'Liability', Go to Advanced tab of Answers.

Go down and find the PREFIX clause, and write the following code in that.


Then Click on Result tab and check the result. Now you will find the changed value Liability.

The request variable overrides the value of session variable only for this request, the session variable will have the actual value 'APD' outside of this request.

Request Variable in Dashboard Prompt  

We can use Request variable in Dashboard prompts to change the value of session variable. The scope of this variable would be Page of Dashboard, depends on the selection.  

Example : Lets use the same session variable LOB (which we used for request) for this example. 

The below request have used the session variable LOB and value of this variable for the current session is 'APD'.


In dashboard prompt,  take the required logical column, select Request Variable from Set Variable drop-down and write the request variable name, LOB is in our case. 

Put the same report and dashboard prompt into the dashboard.

Now select any value from prompt and click on Go.

In my case, I have selected the value 'Property'. The request variable, changed the default value of session variable to the selected value( from prompt).

If we have more than one request in the dashboard, the same will be affected for all the requests in that  dashboard. Outside of this dashboard, the value of the session variable will be the actual value only.

Note : Using a request variable does not change the actual value of a session variable – neither temporarily nor permanently.  It simply appears to change the value for certain purposes during the execution of a request.

1 comment:

  1. It is nice blog Thank you porovide importent information and i am searching for same information
    Tableau Online Training