Oracle Analytics Cloud and Server

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

How to fetch the @{dashboard.caption} variable into the RPD to use like VALUEOF(NQ_SESSION."DASHBOAR

1
Views
3
Comments
918545
918545 Rank 1 - Community Starter

Hello All (11.1.1.7 user here),

I am trying to use the system session variable called @{dashboard.caption} to drive the data filters defined in the RPD (Identity Manager -> Select Role -> Permissions').   On a really simply level, what I am entering into the expression builder is the below syntax:

CASE WHEN VALUEOF(NQ_SESSION."DASHBOARD.CAPTION") = 'My Dashboard Name' THEN 1 ELSE 2 END  =  1

From the front end, if I navigate with a user to the dashboard we'd expect this to work for, we instead get the below error message:

[nQSError: 23006] The session variable, NQ_SESSION.DASHBOARD.CAPTION, has no value definition.

If we can't get the above to work, does anyone know how I can dynamically populate the dashboard name in a session variable, each time the user navigates from dashboard to dashboard, and reference this in the RPD?

Thanks

Comments

  • [Deleted User]
    [Deleted User] Rank 2 - Community Beginner

    Why don't you solve this requirement simply with a prompt which resides on dashboard X but not on dashboard Y and vice versa? That would eliminate the need to "trick" things over a variable.

  • 918545
    918545 Rank 1 - Community Starter

    Thanks, however that wouldn't work for our situation as we are trying to share the same dashboard page across 2 different dashboards X and Y, without creating/maintaining any additional analysis/prompts.  Dashboard X should use project security at a row level, whereas Dashboard Y should use Employee Supervisor security at a row level.  At no time should both securities be applied to the same report, it should be one or the other. I was able to get close to achieving the requirement using the below steps. 1.) Within the Analysis report -> Advanced Tab -> Add the following prefix         Set Variable DashboardSecurityVar='@{dashboard.name}'; 2.) Within the RPD -> Identity Manager -> Role A -> Permissions -> Add the data filter with expression   CASE     WHEN VALUEOF(NQ_SESSION.DashboardSecurityVar) IN ('X')     THEN LogicalTable1.ColumnName     ELSE 1   END    =    CASE     WHEN VALUEOF(NQ_SESSION.DashboardSecurityVar) IN ('X')     THEN ProjectSecurityTable1.SecurityColumnName "     ELSE 1   END For Role B I also added the following data filter:   CASE     WHEN VALUEOF(NQ_SESSION.DashboardSecurityVar) IN ('Y')     THEN LogicalTable2.ColumnName     ELSE 1   END    =    CASE     WHEN VALUEOF(NQ_SESSION.DashboardSecurityVar) IN ('Y')     THEN EmployeeSecurityTable1.SecurityColumnName "     ELSE 1   END The above works is the user has only one of the above roles assigned.  Unfortunately if they have both Roles A and B assigned, both of the logical security tables are joined within the SQL, resulting in either no/or missing data. Any ideas how to get this working, so that the logical security table will only be joined in the SQL based on the VALUEOF(NQ_SESSION.DashboardSecurityVar)?  Ideally I only want the physical SQL join to occur for each of the security tales based on the dashboard they're running it from. Thanks, Lance

  • [Deleted User]
    [Deleted User] Rank 2 - Community Beginner

    I understand what you want to achieve but is it seriously better (whatever "better" means) to maintain hand-written code instead of having one standard, out-of-the-box configuration object with an additional "Filters And Variables" reference to a prompt which will then not even be shown?

    pastedImage_0.png

    In my opinion standard configuration - which will work throughout the upgrades and patches - always beat custom code hacking and believe me I can click on those buttons faster than you can write that code