If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

year(current_date) ???

Started by Nilam, 06 Mar 2014 03:12:10 AM

Previous topic - Next topic

Nilam

Hi Expert,

Can we use year(current_date) in the default selection of value prompt ??

please help...

Thanks a lot.

BigChris

Not out of the box. You'll need to look at either the prompt api, or else javascript.

Nilam

How to use prompt api???
can you plz explain it???

navissar

Actually, there's an out-of-box way that I try to use whenever possible (Because I try to avoid scripts where a built in functionality exists).
1. Add a static value to your year prompt; use value=1, display value= current year.
2. (Possible, for elegance, not required): filter you year prompt's query to not include the current year ([year]<>extract(year,current_date))
3. Set your main query's filter to something along these lines:
(?prmYear?=1 and [year]=extract(year,current_date) or ([year]=?prmYear?)
4. set the default selection of the prompt to 1.

Nilam

Thanks ..
But I have query based value prompt(hierarchy like Year, season, Months, weeks).
Plz help it very urgent...

Thank you.

MFGF

Quote from: Nilam on 06 Mar 2014 05:09:50 AM
Plz help it very urgent...

Please don't do this. It is very rude to be pushy like this.

Take a look at Paragraph 2:

http://www.cognoise.com/index.php/topic,24030.0.html

Thanks.

MF.
Meep!

Lynn

This is the same question you already posted here: http://www.cognoise.com/index.php/topic,24099.0.html

Please review Paragraph 4 here: http://www.cognoise.com/index.php/topic,24030.0.html

Have you experimented at all with the techniques that Nimrod provided? Is this a dimensional or relational source? Does the prompt control use static choices? What is the expected behavior for the various choices?

You got a perfect answer from Nimrod for the question you asked and now you reveal there is more but don't fully explain the requirement. It isn't really a good use of anyone's time, including your own, to approach things in this manner.