cancel
Showing results for 
Search instead for 
Did you mean: 

Prompt with default date ( currentdate-1 and current date-8)

Former Member
0 Kudos

Dear all,

I am creating an @prompt varaiable for Date .

@Prompt('message','type',lov,Mono, free,persistent,default_values)

Requirement is in Place of "Default Values" i need show currentdate -1 and currentdate-8 .

Thanks

suresh.p

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Dear all

we are using 2 prompts

Thanks

suresh.p

Former Member
0 Kudos

I think in the default_value. you can write the below formule.

TO_DATE(TO_CHAR(add_months(sysdate,-1), 'DD-MON-YYYY HH:MI:SS'),'DD-MON-YYYY HH:MI:SS')

TO_DATE(TO_CHAR(add_months(sysdate,-8), 'DD-MON-YYYY HH:MI:SS'),'DD-MON-YYYY HH:MI:SS')

I hope this may help you.

Former Member
0 Kudos

Dear all ,

Iam using universe which is built on infocube(BW) using datafederator , Database is Oracle, iam trying to use the same functions as above mentioned but iam getting error during parsing the condition. where clause of filter in universe is

/Sources/DAPO_C01_DS/IDAPO_C01"."0PSTNG_DATE" =

@Prompt('*Posting Date Range: ','D',,Mono,Free,not_persistant,

{'TO_DATE(TO_CHAR(add_months(sysdate,-1), 'DD-MON-YYYY HH:MI:SS'),'DD-MON-YYYY HH:MI:SS')

}) when i parse iam getting error like invalid definition error parsing default valiues ( 7th parameter) please help me correcting this error.

Thanks

suresh.p

Former Member
0 Kudos

Hi Suresh,

I have got more idea to do this.

1 .Build another object of the same field in unv = u201CDate Rangeu201D

code:

case when (Date between trunc(sysdate u2013 1) and trunc(sysdate)) then u2018Yesterdayu2019

when (Date between trunc(sysdate u2013 😎 and trunc(sysdate+1)) then u2018Last 8 Daysu2019

end

2. Now Add Yesterday in the defalut for currentdate-1 promp or u2018Last 8 Daysu2019 for currentdate-8 Prompt.

= @Prompt(u2019Date Pickeru2019,'Au2019,DateX,mono,constrained,persistent,{u2019Yesterdayu2019})

Create this prompt in the "Date Range" objects. or create a condition, What ever way you want it.

Please try this and see if this can work without any parsing error.

Edited by: srrachna on Mar 17, 2011 12:06 PM

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Suresh,

In simple words, It can not be done. You can not pass default date as Today-1 in business objects prompts. Dave wrote a very good blog post about the same issue. You can check it here

http://www.dagira.com/2008/07/15/how-can-i-make-today-my-default-prompt-value/

He also suggest some work around for the same issue, which might work for you (did not work for us) in the another post

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

Hope this will help.

Regards,

Dinesh

Former Member
0 Kudos

Dear all,

DataSource is Datafederator ---> BI . Yes i need 2 dates by default .

Thanks

suresh.p

0 Kudos

You prompt is defined a single-value prompt. THere is no way to apply 2 default values at once. Unless you are talking about having a picklist with just 2 values.

Regards,

Stratos

0 Kudos

Which data source did you buld your universe on?

Sorry for asking this but it is not quite clear to me: Do you expect to have 2 default values at the same time?

Regards,

Stratos