About
The presentation variable is the only variable offer by the presentation service.
You can use direct some system presentation variable (pre-populate or system presentation variable).
You can set it up (with a dashboard prompt, with a javascript, …)
With a dashboard prompt, it will take the data type of the presentation column.
The presentation variable can be referenced in various areas of presentation service (such as answer and dashboard).
In OBIEE, you have also as variable the OBI server variable that are managed by the oracle BI Server
Articles Related
Syntax
The syntax for referencing presentation variables is as follows:
@{variables.<variableName>}{<default>}[format]
- variables - (optional)
- variableName - a reference to an object available in the current evaluation context that is not a reserved variable name
- default - (optional) - a constant or variable reference in Obiee logical sql indicating a value to be used if the variable referenced by the variableName is undefined as :
- for a string : 'String'
- for a number : 3
- for a date : date 'YYYY-MM-DD'
- format - (optional) - a format mask dependent on the data type of the variable.
For example: :
- #,##0,
- MM/DD/YY hh:mm:ss.
More format example : Using Custom Date/Time Format Strings in Oracle BI Answers
Example
- @{myFavoriteRegion}{'Central'}
- @{myFirstDate}{DATE '1973-07-24'}
- @{myFavoriteString}{'Nico'}
- @{myYear}{max(Time.Year)}
What is the scope of a presentation variable ?
The scope of a presentation variable (as a request variable) depend of the prompt scope.
For instance in the dashboard prompt definition:
Then you can use it exclusively in a dashboard and not for the entire session. For instance, if you leave the dashboard by opening a new report or going into an other dashboard, the value will be reinitialized to the default value defined in the syntax.