Capturing multiple string value in a presentation variable — Oracle Analytics

Oracle Analytics Cloud and Server

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

Capturing multiple string value in a presentation variable

Received Response
172
Views
18
Comments
Saro
Saro Rank 5 - Community Champion

Hi friends,

Im in obiee 11g. In my scenario i have a prompt called period and it is of multi-select

If i select multiple values, then the values will pass like JAN-17;FEB-17;MAR-17 etc.

Is it possible to capture the above string value(JAN-17;FEB-17;MAR-17) in a presentation variable.

Because i tried like (@{v_period}['@']) but this syntax dint work.

How to capture the entire string values(i.e) (JAN-17;FEB-17;MAR-17) in a presentation variable

Thanks in advance.

Regards,

Saro

«1

Answers

  • Hi,

    If you set your prompt to also store the selected values in a presentation variable it will just do it by itself. The variable will have all the selected values.

    So isn't your issue more on "how to use that variable with multiple values" instead of how to capture the multiple values in a variable?

  • Joel
    Joel Rank 8 - Analytics Strategist

    Can you try this:  ('@{v_period}['@']')

  • asim cholas
    asim cholas Rank 6 - Analytics Lead

    Hello Saro

    This is will not work until the late editions of 11g. and it works fine from then. So which is your obiee version.

    OBIEE 11G: Error: "[nQSError: 27005] Unresolved column: saw_0 (HY000)" When Populating a Variable Prompt with a SQL Statement (Doc ID 1345964.1)

    Passing multiple values to a presentation variable

    There seems to be workaround for this issue and it is explained in several blogs(though i havnt tried)

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

    @{v_period}{some sting} automaticall captures multi-value and outputs it as 2014,2015,2016,2017

    And filters also accept that. You can just say "is prompted" and it will work. It's all default functionality.

  • asim cholas
    asim cholas Rank 6 - Analytics Lead

    When it is assigned in column formula, it used to pass like below.

    case when MonthYear in('Jan-2014,Feb-2015,Mar-2016,Apr-2017') then ... end instead of

    case when MonthYear in('Jan-2014','Feb-2015','Mar-2016','Apr-2017') then ... end

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

    Yes, but is that the question of the OP? He just asks for the string in a variable and does not specify any usage.

    In any case if itßs your use case then it points most probably to an improper usage of the solution

  • asim cholas
    asim cholas Rank 6 - Analytics Lead

    Even if we apply the presentation variable in common filters it will work with multiple values. But when it is used inside a column formula it will not.

    Seems like he is searching for this.

    https://support.oracle.com/knowledge/Enterprise%20Performance%20Management%20and%20Business%20Intelligence/1418868_1.htm…

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

    If it's that it's high time to upgrade since it was fixed a long time ago

  • Saro
    Saro Rank 5 - Community Champion

    Hi Gianni,

    If you set your prompt to also store the selected values in a presentation variable it will just do it by itself. The variable will have all the selected values.

    Yes i have a presentation variable assigned to the column period called v_period.

    What im trying to do is, suppose if i select multiple values in my prompt like JAN-17;FEB-17;MAR-17

    Im trying to get the last month name alone from the above string using the below expression like

    substring(@{v_period} from -6 for 3) inorder to get MAR, but this is not working.

    Since my selection of multiple values will be dynamic, so whatever the multi-period i select, i need to get the last month name alone from the string.

    Thanks,

    Saro

  • [Deleted User]
    [Deleted User] Rank 2 - Community Beginner
    Saro wrote:Im trying to get the last month name alone from the above string using the below expression like

    Ok so this is a totally different issue than what you stated above so let's make things clear:

    Is this REALLY what you are after or with the next answer it will become yet another thing that you're trying to do?

    #beprecise