COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: svb on 21 Jan 2020 08:22:17 PM

Title: JavaScript to select 1st value as default value of checkbox prompt
Post by: svb on 21 Jan 2020 08:22:17 PM
How to set 1st value from a checkbox prompt as default value using JavaScript? I've explored other non-JavaScript options but none of them seem to work for multiselect checkbox prompt? I am using Relational model and Cognos 11.0.13.

Thanks!
Title: Re: JavaScript to select 1st value as default value of checkbox prompt
Post by: dougp on 22 Jan 2020 10:29:20 AM
I created a bunch of prompt automation, but haven't got to that one.  Check out https://github.com/dougpulse/Cognos/blob/master/CognosScripts/Prompts.js and feel free to flesh out the PromptIndex feature.  If you do, please share it back to the project.
Title: Re: JavaScript to select 1st value as default value of checkbox prompt
Post by: svb on 23 Jan 2020 07:00:49 AM
I tried but unable to figure this out. I would really appreciate some help with this one. Thanks!