COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: xyz on 28 Sep 2015 05:38:57 AM

Title: javascript to restrict date prompt with the future dates in Cognos 10.2.2
Post by: xyz on 28 Sep 2015 05:38:57 AM
Hi All,

We have a Cognos 10.2.2 and data source is relational, we have a requirement where we have date prompt with Edit box, where we need to restrict the user from future dates. I want to alert the user, whenever the user tries to select the future date instead of current system date in Cognos.

Can someone help me the java script for the same.

Your help is much appreciated?

Thanks & Regards,
XYZ
Title: Re: javascript to restrict date prompt with the future dates in Cognos 10.2.2
Post by: BigChris on 28 Sep 2015 06:07:34 AM
Have you built a calendar / date table in your data warehouse? If you have, you could write a query as the source for your prompt where [Date] < current_date

Alternatively, you could use the table that you're using at the moment, and the filter would be the same...but the performance might be slower.