COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: inu on 01 Sep 2014 11:59:11 AM

Title: limit the prompt selections using javascript
Post by: inu on 01 Sep 2014 11:59:11 AM
HI
As there are two way to retrieve the prompt object in report studio
(1)getElementById()
(2)getFormWarpRequest()

I m familiar with getFormWarpRequest(), where i dont need id. But i have one issue , how to limit the prompt selections when user makes it, if more than 10 selections are there, and click the finish button, then javascript function should throw an alert message.
How to fix this. plz tell me guys.


Cheers!
Inam
Title: Re: limit the prompt selections using javascript
Post by: navissar on 01 Sep 2014 03:04:08 PM
Version? If you're on 10.2+, we can use the promptAPI, otherwise we need to take the long way around.
Also, getting a prompt object to Javascript via getElementById would require that you know the automatically generated Cognos ID, or that you surround the prompt in a certain ID and get the input within.