BusinessObjects Board

Create Custom User Input prompt

Hi all,

I have a requirement to create a custom user prompt.

I have three text values.

  1. USA
    2)India
    3)China

I need to show these three values in the prompt and the end user should able to select among those three.

If he selects India then the report should able to the show the block that belongs to India and similarly for USA and China.

I am familiar on how to hide the block based on conditions.
but i am only worried about the Custom user prompt.

Can any one please give me some suggestions.


Boez (BOB member since 2011-12-08)

Please read this FAQ.


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

Hi Jansi,

I just did what you said but its showing an error

Created a New object with type as character.
and then used the condition below:
=@prompt(‘Select Country’,{‘India’,‘USA’,‘China’},MONO,FREE) \

but its showing the following error:
Parse failed: Invalid definition(UNV0023)

I guess the prompt format is
@Prompt(‘message’,‘type’,[{‘value1’[,‘value2’,…]},class_nameobject_name’],mono/multi,free/constrained) Creates an object that prompts users to enter a specific value.

So what should i mention at the place of Class_nameobject_name??

I also tried in so many different ways its keep on saying the same error.

Can you please help me out

Thanks,
Nik.


Boez (BOB member since 2011-12-08)

It appears that you missed the second parameter - “type”. You will want to use “A” for type.
That would change it to:

=@prompt(‘Select Country’,‘A’,{‘India’,‘USA’,‘China’},MONO,FREE) \


Gman23 :us: (BOB member since 2006-02-22)

Hi,

I tried using A…
but it still showing the same error

=@prompt(‘Select Country’,‘A’,{‘India’,‘USA’,‘China’},MONO,FREE)

My question is, there is no object having country data…
I have a create an object and should pass these three custom values and have to use a prompt based on the values.

The business end uses should be able to select the country in the input prompts.

See that would be reallly great if anyone can tell me the process of creating an object with custom prompt.


Boez (BOB member since 2011-12-08)

If the list of countries is hard-coded in the prompt, then you probably should use “Constrained” as the last parameter. However, this won’t fix your parsing issue. It will merely prevent the user from typing in a different value.

Now, regarding the parsing issue… Since this object is not associated with any table, you have two choices:

  1. Ignore the parsing error. The query will run with the prompt as long as the sytax of the prompt itself is good.
  2. If the object that has the prompt will always be used with only one table, then associate the object with that table. (In Designer, click the “Tables” button beside the “Parse” button on the “Definition” tab of the Object Properties. Select the table and click OK.)

You stated:
"My question is, there is no object having country data… "
If there is no object having country data, how would any prompt allow you to filter on country data that isn’t available in the first place?


Gman23 :us: (BOB member since 2006-02-22)