Tip: Using Row-wise variables and Initialization Blocks

Aside

Tip: Using Row-wise variables and Initialization Blocks

It is often required to use row-wise variables (array’s) to store a list of items. E.g. For the security/visibility it may be required to store the Organization a User has access to. This can be achieved using row-wise variables and Initialization Blocks from OBIEE.

SELECT ‘ActiveOrgs’, OrganizationTable.Name
FROM OrganizationTable
WHERE OrganizationTable.Use = ‘:USER’

This will initialize the Variable ActiveOrgs with the results of the Initialization Blocks. This variable can than be used at other places to filter the respective Organizations.

 

Advertisements

Correct syntax to access variables from Oracle BI Answers

For debugging it can be useful to access session variables of the Oracle BI Server. E.g. to display the current login user Id and the current loglevel of that user:
image

The syntax is not everywhere the same in the Oracle BI Server. The correct syntax to access the variables from Answers is the following:
image

current user: @{biServer.variables['NQ_SESSION.USER']} 
current loglevel: @{biServer.variables['NQ_SESSION.LOGLEVEL']}