COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: nald_p56 on 06 Aug 2007 05:50:47 AM

Title: Dynamically change the default selection of a prompt
Post by: nald_p56 on 06 Aug 2007 05:50:47 AM
Hi!

Is there a way to dynamically change the default selection of a prompt based on ther current day?

Or even even in terms of numbers? if today is august 6, then the value of ?Test_Prompt? = 6.

We created javascript to handle this, but the script will run only once the prompt page is loaded, so if the report is scheduled, then the value of the ?Test_Prompt? is not being populated.


Thankz!
Title: Re: Dynamically change the default selection of a prompt
Post by: COGNOiSe administrator on 09 Aug 2007 09:52:23 PM
Depends. Certaing prompt behavior can be arranged at FM #prompt# level.
Title: Re: Dynamically change the default selection of a prompt
Post by: John on 21 Aug 2007 08:01:56 AM
nald_p56, could you post your javascript to mention? and have you resolved this issue, i am looking for the same solution.
John
Title: Re: Dynamically change the default selection of a prompt
Post by: COGNOiSe administrator on 22 Aug 2007 11:35:18 AM
CurrentDate (and other time ranges) can be passed if #prompt# macro is leveraged at the Framework Manager Model level, as you can specify default value for a prompt. Then scheduled or not, it will always bevahe the same way.
Title: Re: Dynamically change the default selection of a prompt
Post by: vijayab on 13 Feb 2009 05:50:23 AM
Hi

extract(month,current_date)

Try this function,it extracts the Number of the Current month....

:)