How to Use Presentation Variable in Prompt Default Selection — Oracle Analytics

Oracle Analytics Cloud and Server

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

How to Use Presentation Variable in Prompt Default Selection

Received Response
74
Views
3
Comments
Matt_S
Matt_S Rank 3 - Community Apprentice

I have 2 prompt sections I want to link via a presentation variable and SQL statement in the default selection portion of the prompt edit screen.  The first prompt section contains customer information and then second prompt section contains industry information.  These sections have to be separate because I want to allow the user to be able to choose the customer to be compared to the default industry or another one of their choosing.  I'm specifically interested in having the industry field in second section read the presentation variable of the customer field in first section and automatically populate this customer's industry value.

I almost solved how to do this in my specific situation.  I have the syntax down and have successfully tested it using actual values.  I also got the presentation variable to work when the industry and customer fields are in the SAME prompt section.  The variable is NOT read correctly when they are in different sections, however.  I'm looking for a suggestion to overcome this specific obstacle.  Here is the code I have:


SELECT "Customer"."Industry" FROM "Order" WHERE "Customer"."Customer" = '@{PV_name}'

Answers

  • DanPryke
    DanPryke Rank 3 - Community Apprentice

    Hi

    I've attempted to recreate your spec and it works for me in separate sections (using 11.1.1.7)

    Perhaps try setting a default value that you know the first prompt will prompt as default like:

    SELECT "Customer"."Industry" FROM "Order" WHERE "Customer"."Customer" = '@{PV_name}{Sarah}'

    or even having it blank, if the other prompt doesn't have a default value like

    SELECT "Customer"."Industry" FROM "Order" WHERE "Customer"."Customer" = '@{PV_name}{ }'


    Let me know how it goes and if there are any other interesting issues!

  • Matt_S
    Matt_S Rank 3 - Community Apprentice

    I am using .69 version.

    It is working when I set the default value of the presentation variable as well, so again at least I now know that my syntax is correct.  Industry field will still not read presentation variable of Customer if Customer field is located in a different dashboard section.

  • Matt_S
    Matt_S Rank 3 - Community Apprentice

    I found the issue.  I was was using custom java script to format the apply/reset buttons.  This prevented the communication from happening.