Categories
- All Categories
- 150 Oracle Analytics News
- 28 Oracle Analytics Videos
- 14.7K Oracle Analytics Forums
- 5.7K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 54 Oracle Analytics Trainings
- 12 Oracle Analytics Data Visualizations Challenge
- 4 Oracle Analytics Career
- 2 Oracle Analytics Industry
- Find Partners
- For Partners
Using system session variables in RPD formulas

In Answers, I can create this formula to return the user's time zone: '@{session.timeZone}'
Is there a way to create that formula, or something similar, in the Business Model layer of the RPD, so that it can become a simple selectable column in the subject area, and thereby avoid having to build the custom formula in an analysis? I've tried every type of syntax I can think of to reference a system session variable within a logical column in the RPD, none of which work.
I am able to create a logical formula such as VALUEOF(NQ_SESSION.LOGLEVEL), which references the LOGLEVEL system session variable, and that one works, but only because I am setting LOGLEVEL in an initialization block, which makes it appear in the list of selectable session variables on the Expression Builder. The timeZone is set in the user interface under My Account, and therefore doesn't show up in that list. The formula VALUEOF(NQ_SESSION.TIMEZONE) returns 'The session variable NQ_SESSION.TIMEZONE has no value definition.'
Thanks!
Answers
-
@{session....} are OBIPS session variables.
You don't have access to those from OBIS which is one level deeper/lower. There you have these:
https://datacadamia.com/dat/obiee/obis/system_session_variable#data_tz_or_data_display_tz
0 -
Thank you for the reply, Christian. I think I see that I should be using DATA_TZ. But I'm still not finding the right syntax to reference it in a business model layer column. For example, VALUEOF(NQ_SESSION.DATA_TZ) returns "The session variable NQ_SESSION.DATA_TZ has no value definition."
(Also, the 2nd screenshot appears to indicate that we can create a new variable that is one of several different types, but when I right-click the right-hand side of the Variable Manager dialog and select New...TimeZone, the Name field in the subsequent dialog is grayed out. )
0 -
It may not have no value definition by default but you can fill it yourself with an init block.
0 -
An init block would be just fine as well. My problem is the syntax: When a user has set their timezone using the My Account option at the top right of the OBIEE screen, I don't know how to write the correct syntax, in an RPD object, to refer to that. In an analysis, I can refer to it using the Presentation Services syntax, which is '@{session.timeZone}'. But I'm not finding the correct syntax for referring to it in an RPD object, such as an init block or a logical column formula.
I have tried many different methods, such as:
select :USER.DATA_TZ from dual
select ':USER.DATA_TZ' from dual
select :DATA_TZ from dual
select DATA_TZ from dual
select ':DATA_TZ' from dual
select valueof(NQ_SESSION.DATA_TZ) from dual
0 -
-
Gianni, yes, that will work. And it that's what I must do, then I will But I would still like to know that there either is, or absolutely is not, a way to refer to system session variables in the RPD. Thanks for the reply and the suggestion.
0