Monday, 15 October 2012

Request Variable in OBIEE

Request Variable is used to overwrite the value of session variable and it happens only during request initiation to the database from 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.

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.

Syntax for Referencing Request Variable

For displaying Request Variable, we should use either
@{variables.VariableName}[Format]{DefaultValue}
Format and DefaultValue are optional
Format is useful to format the data for e.g., for Date, format can be MM/DD/YYYY. Note: Default Value is not formatted.

@{scope.variables['VariableName']}
Scope should be used if you create variables with same name.
Scope can be analyses, dashboard etc.
Order of precedence is analyses, dashboard pages, dashboards.

For using Request Variable in expression, we should use
@{“VariableName”}{DefaultValue}” Default value is optional.

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...

ShareThis