Skip to Content
avatar image
Former Member

Logic within prompts

Hi all

I have a demand to have 2 separated prompts, for example

the first prompt will be "Gender"  and if the user has selected "Male", then the second prompt will be "Height"

But if the user has selected "Female" then the second prompt will be "Age"

So, actually I want either to hide specific prompts according to user selection or create a dynamic prompt that gets it's values according to user selection in the first prompt.

I have Webi 4.1 and I work over a Unx universe that is based on Hana, but for that matter I would love a solution that will work over MS SQL as well

Thanks

Shlomi

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Oct 18, 2015 at 07:12 PM

    Hi Shiomi,

    You can apply following logic on universe

    Step 1 : Create an object on universe for Gender selection

    Gender_Select = @Select([Gender])

    (Where [Gender] is object which stores value of 'Male' & 'Female')

    Now drag this object on one of the data provider (Query) on WEBI report.

    In query, in select section drag the object [Gender_Select] & apply prompt on original [Gender] Object.

    Step 2 : Create another object on universe

    Prompt_Select = Case when [Gender_Select] = 'Male' then

    @Prompt(‘Enter Height : ’,’A’,[Height],multi,free,,) when [Gender_Select] = 'Female' then

    @Prompt(‘Enter Age : ’,’A’,[Age],multi,free,,)  end


    (In above example in first prompt you have to select Height object & in second prompt you have to select [Age] object.


    Please check @prompt syntax online in case you find some error with that.


    I hope this will help you.


    Thanks,

    Swapnil

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Shiomi,

      Yes Prompt_Select is an Object on universe & it's dimension.

      What else you did not understand please tell me.

      Thanks,

      Swapnil