We have an requirment on Cognos10.1 version Prompt Static choice .
We need to hide static choice prompt value "none" in the Prompt value prompt using java script .
If not possilbe to hide static choice value in prompt page using java script.
We need to uncheck the default selection of "none" value if we select other value in the same prompt using java script .
Please provide me the exact java code on this requirment .
NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
This topic has been locked.
8 replies Latest Post - 2013-09-30T20:54:33Z by Nandagopal
Pinned topic Value Prompt with Java Script requirment on static choice
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2013-01-29T22:46:51Z at 2013-01-29T22:46:51Z by SystemAdmin
Re: Value Prompt with Java Script requirment on static choice2013-01-29T13:04:14Z in response to DanielWagemannHI,
We can able to achieved that using java script as "none" is deselecting when we select any other value in the prompt and also If we select the "none" again it is deselecting the cheked values .
But my requirment again is when I unchecked the values then none is needs to be check automatically.
So please enhance my Java script code as per requirment and provide us the valueble answer .
Please find the same requirment sample report XML using this XML please enhance the java script as per my above requirment .
Thanks & Regards ,
Re: Value Prompt with Java Script requirment on static choice2013-01-29T14:37:51Z in response to pavan009I had a quick look at the JS code you provided and it is a bit confusing... not sure where the deselect all part comes in and why you referencing the same item by three different names.
That being said, I think you are going to need to introduce a counter within your onevent item which checks to see how many items are selected... if 0 then select the none.
Re: Value Prompt with Java Script requirment on static choice2013-01-29T15:16:44Z in response to pavan009Hi,
Provided XML is working fine in Cognos 10.1 Could you please enhance the code further.
My requirement is when I un-check all data item values in the prompt, NONE should be selected automatically which is static choice value. Please see the attachment.
Re: Value Prompt with Java Script requirment on static choice2013-01-29T15:54:03Z in response to pavan009As stated earlier.... add in a counter which counts the number of selected objects within your onevent definition...
If the counter = 0 then select none, else leave your working code in place.
SystemAdmin 110000D4XK15496 PostsACCEPTED ANSWER
Re: Value Prompt with Java Script requirment on static choice2013-01-29T22:46:51Z in response to pavan009Pavan,
I am not really expert in JS. if Daniel method not works then contact Sriram.
on this link u will see his email id . he might be able to help you .