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

Javascript for Multiselect Checkbox Prompt

Started by Cogknow, 20 Dec 2012 03:30:21 PM

Previous topic - Next topic

Cogknow

Hi All,

We have a multi select check box prompt in my report. Prompt values are not static and they are fetched from a database column.
We need to select the first value of the prompt as default value using Javascript.

Using the below script, its picking up the first value as default value but that selection is not visible in the prompt page.

<script language="javascript">
var form = getFormWarpRequest();
var list = form._oLstChoicesChkbox1;
list[0].checked=true;
canSubmitPrompt();
</script>

Can anyone please help us with the code.


Deep750

Beware that scripts selecting the first value will run if you have any autosubmit/reprompting on the page, making the first value selected, even if you have selected any other value in the mean time.

My suggestion, if you have to autoselect the first value, is placing the prompt after any autosubmit/reprompting - prompts.

shravanmaddela

Hey CogKnow,

I have the same issue:

multi select check box prompt in my report. Prompt values are not static and they are fetched from a database column.
We need to select the first value of the prompt as default value using Javascript.

Can you please help me how did you achieved this using JavaScript and if possible can you please post the javascript how you handled it.

Thanks
Shravan