About
You can set up a presentation variable:
- only through the user interface
- programmatically with javascript is not yet supported
And you can use it then in many places : OBIEE - Where can I use a presentation variable ?
Articles Related
Syntax
@{MyPresentationVariable}{MyDefault Value}
Example
@{myYear}{max(Time.Year by)}
Which means:
- use the presentation variable myYear
- and if it's not yet set then use as default the maximum year of the data set.
Multiple value / select
- OBIEE 10g: You cannot set a Presentation Variable in a Multi Select dashboard prompt in OBIEE 10g. This is expected behavior. OBIEE 10g is working as designed. A Presentation variable can assume a single value. Because of that, presentation variables are not available when using multi select prompts. See note 965224.1
- OBIEE 11g will introduce the ability to set Presentation Variables when using multi select prompts. In 10g you can try as a workaround using more than 1 prompt.
How to set it up
With the user interface
In 10G, the dashboard prompt is the only way to set a presentation variable. With the advent of 11G, you can now set a presentation variable with the help of a variable prompt
When the dashboard or variable prompt is used in a dashboard, the variable is simply set with the new value.
Dashboard prompt
When you create a dashboard prompt, you have in the column “set variable” the choice between two values :
- a OBIEE - Request variable. The request variable is a variable that you can add to the obiee logical sql (the request) to set a repository session variable.
- Select in the Set Variable Column, the value “Presentation variable”
- Enter a name for your presentation variable
10G
11G
Variable prompt
With Javascript
This functionality does not exist at the moment.: OBIEE 11g: How To Set the Value of a Presentation Variable Using Javascript