BusinessObjects Board

Adding hardcoded value like 'ALL' for a Prompt

Hi,
I have a situation where in the user can enter ‘ALL’ in the prompt or select a particular value from list for a condition. This works in the BO Reporter. But when i export the universe and try it with the Web Intelligence, it doesnt allow me to enter anything and just select a value.
How can this problem be overcome in WEBI???

Please Help!!!

Thanks in advance

Karthik.


karthikms (BOB member since 2002-10-29)

My suggestion:

Create a Universe or UDO object whose syntax (Select) is simply “ALL”.
In the BO Reporter module or WebI query panel create a condition as follows:
Object eqaul to (or inlist) Prompt 'Select a value or ‘ALL’
or
“ALL” equal to (or inlist) Prompt 'Select a value or ‘ALL’ (here “ALL” stems from the universe object created in step 1).

If the user enters “*” as prompt value then the second part of the 'OR’ed condition will be to true and evaluate to “ALL” = “ALL” thus effectivly removing the condition i.e. there is no condition, all values will be returned.

The advantage of this method is that it can be re-used for any (dimension) object in the universe !!

if you have any questions then please let me know

regards

Wolfgang

P.S.
Two more things that may need clarification:
1.the second condition ("" equal to prompt…) is being created by re-using the first prompt (Select from a list of prompts)
2. the syntax for the "
" object in Oracle is ‘ALL’ i.e. using single quotes. A parse will fail because it doesn’t reference a table, but you can disregard this. However in the advanced properties you should specify that this object can only be used as condition.

An example of how a generated SQL with this method looks like is:

SELECT
OBJ_M_DOC_pend.M_DOC_C_NAME
FROM
OBJ_M_DOCUMENTS OBJ_M_DOC_pend
WHERE
(
OBJ_M_DOC_pend.M_DOC_C_NAME = @variable(‘Which Docu’)
OR ‘ALL’ = @variable(‘Which Docu’)
)


Wolfgang (BOB member since 2002-08-19)

I would stay away from UDO (=User Defined Objects), since they are local to the user and the machine they were created under/with, and I believe therefore they will not work in WEBi either or for any other user (until you start copying UDO files forth and back - not recommended).

I would create a predefined condion in the universe “Prompt for Region with All” and define the Where clause accordingly.

Also, see FAQ: Designer for a closely related thread…


Andreas :de: (BOB member since 2002-06-20)

Servus Andreas,

I agree with your objections to using UDOs, but sometimes they maybe the only way out (if the user is not he designer and the designer refuses to do it at the universe level, for example). And this is why I mentioned UDOs…

The method suggested is a different approach to the often discussed @prompt method, and also has its advantages:

  1. the user himself can decide whether to implement a ‘ALL’-prompt for the object (in the case of the @prompt method, the prompt is being imposed on the user).
  2. the ‘ALL’-Object option is not binding the ‘ALL’-prompt to a certain object but can be used for any object that the user wants to have a prompt for, i.e. greater flexibility

regards

Wolfgang


Wolfgang (BOB member since 2002-08-19)

UDO’s are fine but they don’t work in Webi. And since this issue is with Webi, a UDO would not work.


MichaelWelter :vatican_city: (BOB member since 2002-08-08)