cancel
Showing results for 
Search instead for 
Did you mean: 

Current date as Default value in prompt

Former Member
0 Kudos

Hi All,

I need a help in BO Universe:

Basically I am creating a object in universe with the below definition:

Object 1:

case

when (date - (@Select(Activation Date))+30) ) <=0 then '0'

when (date - (@Select(Activation Date))+30)) >=1 and

(date - (@Select(Activation Date))+30)) <=30 then '1-30'

END

The date field above should a prompt where default value will be current date.

So I am creating below object which will be replaced with Date field above:

@Select(Activation Date) = case when @Prompt('Enter date','D',,Mono,Free,Persistent,{'1900-01-01'}) = '1900-01-01' then date else

@Prompt('Enter date','D’,,Mono,Free,Persistent{'1900-01-01'}) end

But this is not working.

Can you please let me know what is the issue in the above formula.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Have a look through this blog entry, it goes through it in great detail:

http://www.dagira.com/2008/07/21/using-a-magic-date-value-in-prompts/

Former Member
0 Kudos

Hi,

I tried the below formula, but it is giving error in universe and also WebI Report.

(CAL.CALENDAR_DATE) = CASE  WHEN to_date(@Prompt('Enter Date','D',,mono,free,persistent,{'1900-01-01'}) = '1900-01-01';'yyyy-MM-dd') then DATE else

to_date(@Prompt('Enter Date','D',,mono,free,persistent,{'1900-01-01'}) end);'yyyy-MM-dd')

Can you please let me know how to get current date as default value in the prompt.

I am using BO XI 3.1 and Teradata.

Thanks

Sindhu

former_member190722
Participant
0 Kudos

Hi,

Please try using the below formula in your Date Object

CASE  WHEN @Prompt('Enter Date','D',,mono,free,persistent,{'1900-01-01'}) = '1900-01-01 00:00:00'  then DATE else

cast (@Prompt('Enter Date','D',,mono,free,persistent,{'1900-01-01'})  as date) end

Regds,

Hafeez

Former Member
0 Kudos

Hi Hafeez,

The formula is working. Thank you very much for your help.

Regards

Sindhu

Answers (0)