Default value in Free hand Sql Prompt

Hi,

The “OK” button of a prompt not enabled untill provide a value, i wanted to eliminate this, that is if am not providing any value, it should take empty string ’ '. i,e. ename = ’ ’

pls help

Tkj


BOBJ_USER (BOB member since 2004-10-26)

A prompt is made in order to be filled :wink:
If you don’t want to provide an argument, then, remove the prompt condition or make it with a link letting you able to enter one particular value or just fill it with % to have all

Regards


bernard timbal :fr: (BOB member since 2003-05-26)

Hi,

thanks for the quick reply.

wanted to keep prompt but I may or may not provide value thats what i mentioned “if i am not providing value”

thanks
tkj


BOBJ_USER (BOB member since 2004-10-26)

Yes, but a prompt is made to be filled, no other way…


bernard timbal :fr: (BOB member since 2003-05-26)

What should be the output when no value is fetched?

If you want all values… then you can define a universe prompt as below.

Select = prompt or “” = (same) prompt

In this case when nothing is entered then the later will be true. But I am not sure whether BO will accept “”. We used to put a “*” over there so that when a user wanted all values then he entered *.

Hope this helps…

Rgds,
Sam…


sam.busobj :india: (BOB member since 2006-04-08)

Pompts are not optional, once you use prompts each and every prompt must be filled out. Business Objects now provides default prompt values for WebIntelligence.


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

Hi All,

may be my question is wrong. I need the following option with freehand sql.

i want something like this. if i provide ‘ALL’ then it should fetch all the rows otherwise should fetch for the provided value.

select * from emp where ename = ‘ALL’

probably am looking for a case statment .

select * from customers where customer_id = case when @variable(‘cust id’) = ‘ALL’ then customer_id else 1234 end

thanks
Tkj


BOBJ_USER (BOB member since 2004-10-26)

Try this:

SELECT * FROM customers
WHERE @variable('cust id') = 'ALL' OR
customer_id = @variable('cust id')

If the prompt is filled in with ‘ALL’ the condition is essentially ignored because ‘ALL’ = ‘ALL’ is true by definition. Otherwise, the query will be limited to the chosen customer_id.


Dwayne Hoffpauir :us: (BOB member since 2002-09-19)

Hi Andreas,

Can you give more details about this?

I’m looking for a way to set a default value for a prompt which is displayed on all reports. This prompt is to set the year of reference for some calculations. Default value should be the current year. I would like to define this prompt at universe level since i will have to match the prompted year with fields year from many tables.

Thanks


jerryf :fr: (BOB member since 2006-02-13)