cancel
Showing results for 
Search instead for 
Did you mean: 

Default value in @Prompt

Former Member
0 Kudos

Hi,

Can I use the @prompt function to set a default date in the date prompts? Or Dynamic dates

IDT 4.0

Thanks

Veena

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Thanks for your help! I have the syntax below. It works fine, but how do I display the "date" and not "7 days" in the prompt?

calendar.date BETWEEN (Case WHEN  @Prompt(' From Dt:','A',,Mono,Free,Persistent,{'7 Days'})='7 Days' then CONVERT (VARCHAR ( 30), dateadd (day ,-7, getdate ()),101 )

ELSE @Prompt(' From Dt:','A',,Mono,Free,Persistent,{'7 Days'}) END)

AND

(Case WHEN  @Prompt('To Dt:','A',,Mono,Free,Persistent,{'Today'})='Today' then CONVERT(VARCHAR(30),GETDATE(),101)

ELSE @Prompt('To Dt:','A',,Mono,Free,Persistent,{'Today'}) END)



Thank You

Veena

Former Member
0 Kudos

Hi Veena,

You should read the blog carefully that I suggested earlier. This is not possible and you can not show a dynamic date as default in the report using @prompt or by any other means..

Please go through the full blog by Dave blog specifically where it mentioned about default..

Dave’s Adventures in Business Intelligence » How Can I Make “Today&amp...

Former Member
0 Kudos

Hi Durgamadhab,

I did read the blog, but I was wondering if there is a work around this? I guess not!

Thank You

Veena

Former Member
0 Kudos

I am also hoping to see this feature in every new release since BOXI R2 but no luck yet

Former Member
0 Kudos

I read somewhere they have this feature in HANA. I'm not sure.

Former Member
0 Kudos

Webi is yet to handle the HANA custom hierarchies and variables so there is no option to do this with HANA as well..

Sujit
Active Participant
0 Kudos

Hi Veena,

In the above sysntax, could you try replacing "7 days" with an object calculating the defautl date you require or with Sysdate() function if you using ORacle as DB?

Also, I tried creating a date prompt at the WebI (version 3.1) level with Default Date as 01/01/2013, and every time the report is refreshed, default date is present..no user selection is required.

Am i interpreting your requirement wrongly?

what version of BO you Using?

You want the prompt to be at Universe Level or Report Level?

Sujit

Former Member
0 Kudos

Sujit Honrao;

Can you update with your @prompt code which works for default date?

Former Member
0 Kudos

Hi Sujit,

BO 4.0

SQL Server 2008

I want to implement this at the Universe level.

Thank You

Veena

Answers (5)

Answers (5)

Sujit
Active Participant
0 Kudos

Durga, i have done this at the Report Level, Webi Prompt window provides you with an option to set the default values.

Let me check the SQL syntax generated, will update you.

Sujit

Former Member
0 Kudos

Set Default in the Prompt function which will always displays that date

Sujit
Active Participant
0 Kudos

alternatively, prompts are the report level provide you with option to select default values,, you can try that if not already selected.

It also provides you to refer to variabe, You can create a variable to calculate the required date and reference it in this prompt.

try it,

Sujit

Sujit
Active Participant
0 Kudos

You can create a date object with the required date, and then use this object in the @Prompt function as a parameter for "default values"

Let me know if this helps,

Sujit

Former Member
0 Kudos

If you are looking for a default date like today or a relative date like first day of last month ; I will suggest to look into the link below where Dave has explained the process brilliantly

Dave’s Adventures in Business Intelligence » Using a “Magic Date&#...