Oracle Analytics Cloud and Server

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

Assign multiple values to a static repository variable in OAS repository

Accepted answer
42
Views
5
Comments

Good day

I want to assign the following list values to a static repository variable in a OAS repsitory: Jan_PTD, Feb_PTD, Mar_PTD, Apr_PTD, May_PTD, Jun_PTD, Jul_PTD, Aug_PTD, Sep_PTD, Oct_PTD 

I then want to reference the variable in the "Default selection" section in a dashboard prompt so that the values in the prompt dropdown box are ticked/selected in the dashboard prompt.

I tried the following syntax, but it generated a a single string in the prompt dropdown box: 'Jan_PTD; Feb_PTD; Mar_PTD; Apr_PTD; May_PTD; Jun_PTD; Jul_PTD; Aug_PTD; Sep_PTD; Oct_PTD'

Thanks

Johan

Best Answer

  • GayathriAnand-Oracle
    edited November 1 Answer ✓

    So the idea is that you don't use Static Repository Variable in admintool, instead create Dynamic Repository variable but use SQL in the init block to populate with Static Values and use row-wise.

Answers

  • SteveF-Oracle
    edited October 31

    Hi Johan ( @User_2BNF3 )

    See:

    About Repository Variables

    A repository variable has a single value at any point in time.

    I believe what you are looking for is here:

    Create Variable Prompts

    Other comments, welcomed.

  • Hi Johan,

    Row-wise variables are definitely a thing, but I generally populate them with the result of a query and therefore it's a while since last time I had to set a default value for those.

    I believe the remember that they are represented as a list of values separated by colons.

    Instead of ';', try with ':'. It could start behaving as a row-wise initialized variable with some luck…

  • Another example using multiple values row-wise session variable in initialization block

    https://108obiee.blogspot.com/2009/10/using-multiple-values-row-wise-session.html

  • BalagurunathanBagavathy-Oracle
    BalagurunathanBagavathy-Oracle Rank 6 - Analytics Lead
    edited November 1

    @User_2BNF3

    Please use the query below for your row-wise initialization block where PTD_Var is the variable name.

    select 'PTD_Var', PTD from
    (
    select 'Jan_PTD' PTD from dual
    union
    select 'Feb_PTD' PTD from dual
    union
    select 'Mar_PTD' PTD from dual
    union
    select 'Apr_PTD' PTD from dual
    union
    select 'May_PTD' PTD from dual
    union
    select 'Jun_PTD' PTD from dual
    union
    select 'Jul_PTD' PTD from dual
    union
    select 'Aug_PTD' PTD from dual
    union
    select 'Sep_PTD' PTD from dual
    union
    select 'Oct_PTD' PTD from dual
    )