BusinessObjects Board

Make SYSDATE as default value in Date prompt

Hi,

I have created a prompt for end date with SYSDATE as default value. But I am not seeing the SYSDATE as default value. The prompt is blank.

Below is the code of the prompt. Please let me know what is wrong in my code.

@prompt(‘Select Date for Tree History’,‘d’,mono,free,Persistent,SYSDATE,User:0)

Thanks in advance for the help

Regards
Narayanan


narayanan83 :india: (BOB member since 2010-01-21)

Hi, your question is answered here in the FAQ, thanks.


Dave Rathbun :us: (BOB member since 2002-06-06)

Thanks for your reply Dave.


narayanan83 :india: (BOB member since 2010-01-21)

Hi Dave. What is the " extended syntax" you are talking about.

I have a similar requirement which is surelly very common) :
we have some reports used both in daily publications (XI3.1) and in an interactive way.

In publication, we need to use sysdate as default values and in the same time, users refreshing this report could be able to select any date.

I created the following predefined filter

@Select(Dates\Date)= case when @Prompt('dd/mm/yyyy or <today>','A',,mono,free,persistent,) = 'today' then Cast(Floor(Cast(getdate() as float)) as datetime) else @Prompt('dd/mm/yyyy or <today>','A',,mono,free,persistent,) end

which works fine in an interactive way but in publication, it doesn’t appears in the prompt section because publication seems to not be able to recognize such predefined filter as prompts…

How could you do that using simple prompt ? :hb:


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

One issue that I try to avoid is mixing data types. In your example, you are prompting for a date but also allowing users to enter the word “today”, correct? What I have typically done is assign a special date to be taken as today instead. There is a blog post about that technique (along with some excellent comments from folks with alternate techniques) here:


Dave Rathbun :us: (BOB member since 2002-06-06)

Hi Dave

Correct, it can be an issue mixing data types but even replacing ‘today’ by a particular date doesn’t solve my trouble because all solutions and comments on your blog (I already know it :wink: ) concerns filter and such objects are not recognized as prompts on publications (if you see what I mean)


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