Using Variables to Display Values in Request Results, Dashboards and iBots
You can reference a session variable, repository variable (e.g. User.displayName), or a presentation variable, and use its value in request results, dashboards and iBots. For more information about variables, see Oracle Business Intelligence Server Administration Guide. This section contains the following topics:
Session and repository variables are pre-defined values held on the server (e.g. NQ_SESSION.System.currentTime). A presentation variable must be declared in a dashboard prompt (using the Set Variable field), and its name and value are determined by the user, either when it is initially declared, or when it is referenced in request results, dashboards and iBots.
For more information about declaring presentation variables in a dashoard prompt, see Creating a Dashboard Prompt for Filtering Oracle BI Requests.
The following examples suggest how you might reference a session variable or a presentation variable:
- Example 1 - Referencing a session variable
- Example 2 - Referencing a presentation variable Where a dashboard report displays a prompt for a single region, the author would like to display the region selected by the user in the title of the dashboard report. To do so, the author simply adds a reference to a presentation variable in the report title for example, @{variables.myFavoriteRegion}. The presentation variable (myFavoriteRegion) needs to have been declared for the dashboard prompt. This presentation variable displays whatever region has been entered by the user in this dashboard prompt.
Where can you reference variables?
- Title Views
- Narrative Views
- Column Filters
- Column Formulas
- Conditional Formatting conditions (presentation variables only)
- Direct Database Requests
- Dashboard prompts
- Chart scale markers.
- Gauge range settings.
- Static text.
- iBot Headlines and text
What is the syntax for referencing session variables?
- NQ_SESSION - indicates that this item references a session variable.
- variableName - a reference to an object available in the current session context. For example: dashboard.description.
What is the syntax for referencing repository and presentation variables?
- @{<variableName>}{<value>}[format] - for repository variables
- @{variables.<variableName>}{<value>}[format] - for presentation variables For example, @{variables.myFavoriteRegion}{Central} - inserts the value of the presentation variable myFavoriteRegion.
- variables - prefix that is required when you reference a presentation variable in a request.
- variableName - a reference to an object available in the current evaluation context. For example: @{variables.myFavoriteRegion}.
- value - (optional) - a constant or variable reference indicating a value to be used if the variable referenced by the variableName isn't populated (is undefined).
- format - (optional) - a format mask dependent on the data type of the variable. For example: #,##0, MM/DD/YY hh:mm:ss, and so on. NOTE: If the @ sign is not followed by a {, it will be treated as an @ sign. For more information, see Editing the Appearance of Column Contents in Oracle BI Answers.
What pre-defined variables can be referenced in request results, dashboards and iBots?
The following table contains a list of pre-defined variables that can be referenced in request results, dashboards, and iBots.
Table 7.
No comments:
Post a Comment