About Session Variables

Session variables are initialized when a user signs in.

These variables exist for each user for the duration of their browsing session and expire when the user closes the browser or signs out. There are two types of session variable: system and non-system.

System Session Variables

There are several system session variables that you can use in your reports and dashboards.

The system session variables have reserved names so you can’t use them for any other kind of variable.

System Session Variable Description Example SQL Query Value (Variable dialog)

PORTALPATH

Identifies the default dashboard a user sees when they sign in (they can override this preference after signing in).

To display ‘mydashboard’ when a user signs in:

 select ‘/shared/_portal/mydashboard’ from dual;

TIMEZONE

Specifies the default time zone for a user when they sign in.

A user’s time zone is typically populated from the user’s profile. Users can change their default time zone through preferences (My Account).

To set the time zone when a user signs in:

select ‘(GMT-08:00) Pacific Time (US & Canada)’ from dual;

DATA_TZ

Specifies an offset from the original time zone for data.

This variable enables you to convert a time zone so that users see the appropriate zone.

To convert time data to Eastern Standard Time (EST):

select ‘GMT-05:00’ from dual;

This example means Greenwich Mean Time (GMT) - 5 hours

DATA_DISPLAY_TZ

Specifies the time zone for displaying data.

To display Eastern Standard Time (EST):

select ‘GMT-05:00’ from dual;

This example means Greenwich Mean Time (GMT) - 5 hours

Non-System Session Variables

The non-system session variables are named and created in your semantic model.

For example, your data modeler might create a SalesRegion variable that initializes to the name of a user's sales region when they sign in.