OBIEE - Presentation Variables
Table of Contents
1 - 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).
2 - Articles Related
3 - 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
4 - Example
- @{myFavoriteRegion}{'Central'}
- @{myFirstDate}{DATE '1973-07-24'}
- @{myFavoriteString}{'Nico'}
- @{myYear}{max(Time.Year)}
5 - 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: