Universe object using Userresponse or @variable

Hi,

I am trying to create a universe object with a case statement that depends on the userresponse of a prompt in my report.

Some thing like

case userresponse(“Select”) when ___ then ___
when ___ then ___

And i have to use this object as a different prompt.

Is it really possible? Can this be done?
I tried doing this, but dont know where i am going wrong.

My reports is asking prompting me for 5 prompts to be entered manually!
And my report does not run.


bobj_user_a (BOB member since 2010-03-25)

UserResponse() is a report level function. You’ll have to use @prompt() at the universe level. And keep all the prompt texts exactly the same to have the prompt appearing only once.


Jansi :india: (BOB member since 2008-05-12)

The @prompt was created at the universe level.

The prompt texts are the same. But, the prompt is displayed in the following way.

  1. select object:
  2. object1/2 start date:
    select object:
  3. object1/2 end date:
    select object:

The object i put the 2nd and 3rd prompts act as Object 1 and Object 2 depending on the user response of my 1st prompt.

The prompt display does not matter, but can some one confirm,

“Can we create an object in universe which depends on the prompt select by user in the report level!”


bobj_user_a (BOB member since 2010-03-25)

Prompts cannot currently depend on previous prompts. All prompts are displayed together, and can be answered in any order.

If you want to change values based on a previous prompt answer, you have to use Cascading Prompts which are created in the universe. The typical example is to prompt for a state, then get a list of cities that belong to the selected state, and finally get a location from the list of locations within that city.

If you can provide specific requirements for what you are trying to do (rather than the generic examples provided so far) you might get better help.


Dave Rathbun :us: (BOB member since 2002-06-06)

i have 2 reports. Both are the same, but only difference is the prompt i am using are on two different objects.

Say
1 report has the prompt
add_date between prompt1 and prompt2

2nd report has
deleted_date between prompt1 and prompt2

Now, my user wants to see both the reports in a single report (same tab).

So, i have to come up with a 3rd prompt asking him to choose between add and delete
3rd prompt
selection = add or deleted

depending on the “selection”, one of the first 2 prompts should be executed.


bobj_user_a (BOB member since 2010-03-25)

All prompts will be executed, the trick is to make them do what you want. :slight_smile:

Here is a prompt definition that will allow the user to pick Add or Delete from a list:

@prompt('Add or Delete?','A',{'Add','Delete'},mono,constrained)

Now take that prompt and embed it in a case statement for the actual condition.

case @prompt('Add or Delete?','A',{'Add','Delete'},mono,constrained)
when 'Add' then table.add_date
when 'Delete' then table.delete_date
end
between
@prompt('Enter begin date','D',,mono,free)
and
@prompt('Enter end date','D',,mono,free)

Dave Rathbun :us: (BOB member since 2002-06-06)

thanks dave.

But, i cant test my universe now as i already got my QA sign-off and i dont want to play with it till the end of this week.
I will test this on monday.

can you please tell me one more thing (may be this wil make me look dumb, but)

should the code be an object in my universe? or a condition?
If it is an object, will it ask me for prompts, even if i put the object in the select panel, and not in the condition panel in the query panel.

Thanks


bobj_user_a (BOB member since 2010-03-25)

It’s intended to be in the “where” clause, thus it’s a condition.


Dave Rathbun :us: (BOB member since 2002-06-06)