cancel
Showing results for 
Search instead for 
Did you mean: 

Logic within prompts

shlomi_weiss2
Participant
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

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

shlomi_weiss2
Participant
0 Kudos

Hi Swapnil

Thanks for you reply

Unfortunately, I couldn't understand your proposed solution

What is the Prompt_Select stands for?

What kind of objects do I create? Dimension? Filter?

Thanks

Shlomi

Former Member
0 Kudos

Hi Shiomi,

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

What else you did not understand please tell me.

Thanks,

Swapnil