Skip Headers
Oracle® Business Intelligence Enterprise Edition Help
11g Release 1 (11.1.1)
  Go To Table Of Contents
Contents

Using Variables

You can reference variables in several areas of Oracle BI Enterprise Edition, including in analyses, dashboards, KPIs, actions, agents, and conditions. For example, suppose that you wanted to create an analysis whose title displays the current user's name. You can do this by referencing a variable.

There are four types of variables that you can use:

What Are Session Variables?

A session variable is a variable that is initialized at login time for each user. When a user begins a session, the Oracle BI Server creates a new instance of a session variable and initializes it.

There are as many instances of a session variable as there are active sessions on the Oracle BI Server. Each instance of a session variable could be initialized to a different value.

There are two types of session variables:

  • System — A session variable that the Oracle BI Server and Oracle BI Presentation Services use for specific purposes.

    System session variables have reserved names that cannot be used for other kinds of variables (such as static or dynamic repository variables and non-system session variables).

  • Non-system — A system variable that the administrator creates and names. For example, the administrator might create a SalesRegion non-system variable that initializes the name of a user's sales region.

The administrator creates non-system session variables using the Oracle BI Administration Tool.

For more information, see "About Session Variables" in Oracle Fusion Middleware Metadata Repository Builder's Guide for Oracle Business Intelligence Enterprise Edition.

What Are Repository Variables?

A repository variable is a variable that has a single value at any point in time.

There are two types of repository variables:

  • Static — Repository variables whose value persist and do not change until the administrator decides to change them.

  • Dynamic — Repository variables whose values are refreshed by data returned from queries.

The administrator creates repository variables using the Oracle BI Administration Tool.

For more information, see "About Repository Variables" in Oracle Fusion Middleware Metadata Repository Builder's Guide for Oracle Business Intelligence Enterprise Edition.

What Are Presentation Variables?

A presentation variable is a variable that you can create as part of the process of creating one of the following types of dashboard prompts:

  • Column prompt — A presentation variable created as part of a column prompt is associated with a column, and the values that it can take come from the column values.

    To create a presentation variable as part of a column prompt, in the "New Prompt dialog" (or Edit Prompt dialog), you have to select Presentation Variable in the Set a variable field and then enter a name for the variable in the Variable Name field.

    For information on working with column prompts, see "Creating a Column Prompt".

  • Variable prompt — A presentation variable created as part of a variable prompt is not associated with any column, and you define the values that it can take.

    To create a presentation variable as part of a variable prompt, in the "New Prompt dialog" (or Edit Prompt dialog), you have to select Presentation Variable in the Prompt for field and then enter a name for the variable in the Variable Name field.

    For information on working with variable prompts, see "Creating a Variable Prompt".

The value of a presentation variable is populated by the column or variable prompt with which it was created. That is, each time a user selects a value in the column or variable prompt, the value of the presentation variable is set to the value that the user selects.

What Are Request Variables?

A request variable lets you override the value of a session variable but only for the duration of a database request initiated from a column prompt. You can create a request variable as part of the process of creating a column prompt.

A request variable that is created as part of a column prompt is associated with a column, and the values that it can take come from the column values.

To create a request variable as part of a column prompt, in the "New Prompt dialog" (or Edit Prompt dialog), you have to select Request Variable in the Set a variable field and then enter the name of the session variable to override in the Variable Name field.

For information on working with column prompts, see "Creating a Column Prompt".

The value of a request variable is populated by the column prompt with which it was created. That is, each time a user selects a value in the column prompt, the value of the request variable is set to the value that the user selects. The value, however, is in effect only from the time the user presses the Go button for the prompt until the analysis results are returned to the dashboard.