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

Cognos 8.4.1 Select & Search prompt default option Javascript

Started by pcog, 12 Dec 2013 04:14:55 PM

Previous topic - Next topic

pcog

I have requirement to change the default selection of Cognos Select & Search prompt. By default Cognos will select the 'Start with any of these keywords', but user requested to have default option of 'Contains any of these keywords'. They also want to remove the other options, but I can negotiate with that if I get the default option per requirement.
I found KB technote 1372246 and 1341747, but those are not working, may be because those are not for 8.4.1.

Does anyone had this req before or can anyone help me out here?

pcog


CognosPaul

Put an HTML item before the prompt with: <div id="mySnS">

Put another HTML item after the prompt with </div><script>document.getElementById('mySnS').getElementsByTagName('input')[4].click();</script>
That should select "Contains any" in all versions of Cognos.

I don't have a copy of 8.4.1, so I don't know the DOM structure of the prompts. Use IE Dev Toolbar to examine the prompt. Then you can figure out which element to hide.
Something like:
<script>document.getElementById('mySnS').getElementsByTagName('div')[5].style.display='none';</script>

pcog

Thanks a lot Paul, it is working now.
But, the second response in your post regarding hiding any of those options? If yes, where should I include that script? in a separate HTML item or the second one?
sorry I'm not expert in using java scripts :(