Optional document prompt?

Is there a way to make a prompt optional, that is, the user may leave it blank to retrieve all values?

Larry Rosenblum
Saama Technologies, Inc.


Listserv Archives (BOB member since 2002-06-25)

This is how I would do it, since it does not involve @functions or scripting…

First, create a User Object, say, ‘All Values’. Give it the constant value ‘’ (an empty string, no spaces.) (Personally, I would make this constant value the string ‘ALL’, and make the user enter that when they want to see all values.)

Now, when you create your condition, say it is on Customer Name, you first create your condition normally:

Customer Name Equal to Prompt (‘Customer Name’)

Then, create one more condition, this time on the user object All Values; by default, it will be “And”-ed together:

Customer Name Equal to Prompt (‘Customer Name’) And
All Values Equal to Prompt (‘Customer Name’)

Double-click the “And” to make it an “Or”.

Customer Name Equal to Prompt (‘Customer Name’) Or
All Values Equal to Prompt (‘Customer Name’)

If the user enters a customer name, the first condition will be true, the second false, and you will only retrieve data for the user-entered value.

If the user enters an empty string, the first condition will be false, but the second condition will be true, making the first condition irrelevant, and you will retrieve data for all values.


Erich Hurst
Compaq Computer Corporation


Listserv Archives (BOB member since 2002-06-25)

Erich,
That was a really neat idea. Never thought about doing something like that. HAve had need of it, but never had a good solution for it. I took it a step farther and if you have a predefined condition, this is the syntax that I used. Then you don’t have to rely on a user object, which can cause problems.

(@Select(Group\User ID) IN @Prompt(‘User id:’,‘A’,‘Group\User ID’,multi,free)) OR (‘ALL’ IN @Variable(‘User id:’))

Glenn Fredericks
Data Warehouse Specialist
glenn_fredericks@aal.org
(920) 730-4700 x4236 or 1-800 CALL AAL

Aid Association for Lutherans
4321 N. Ballard Road
Appleton, WI 54919-0001
Visit our Web site at www.aal.org or e-mail us at aalmail@aal.org

AAL… Financial services. Lutheran heritage. A powerful combination.


Listserv Archives (BOB member since 2002-06-25)

Business Objects won’t let me use an empty string as the value of a user item.

Larry Rosenblum
Saama Technologies, Inc.

Erich Hurst wrote:

This is how I would do it, since it does not involve @functions or scripting…

First, create a User Object, say, ‘All Values’. Give it the constant value ‘’ (an empty string, no spaces.) (Personally, I would make this constant value the string ‘ALL’, and make the user enter that when they want to see all values.)


Listserv Archives (BOB member since 2002-06-25)

You’re right. I should have tested this first. My apologies. (That must be why I use a literal like ‘ALL’ instead of an empty string…)


Erich Hurst
Compaq Computer Corporation


Listserv Archives (BOB member since 2002-06-25)