Topic
  • 8 replies
  • Latest Post - ‏2013-09-30T20:54:33Z by Nandagopal
pavan009
pavan009
14 Posts

Pinned topic Value Prompt with Java Script requirment on static choice

‏2013-01-21T14:21:16Z |
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 .
Updated on 2013-01-29T22:46:51Z at 2013-01-29T22:46:51Z by SystemAdmin
  • pavan009
    pavan009
    14 Posts

    Re: Value Prompt with Java Script requirment on static choice

    ‏2013-01-22T08:06:10Z  
    Hi ,

    This is our critical requirment in my application ,
    So pplease help us .

    Thanks
    Pavan
  • DanielWagemann
    DanielWagemann
    411 Posts

    Re: Value Prompt with Java Script requirment on static choice

    ‏2013-01-22T15:15:05Z  
    • pavan009
    • ‏2013-01-22T08:06:10Z
    Hi ,

    This is our critical requirment in my application ,
    So pplease help us .

    Thanks
    Pavan
    This should help you get started with your own code:

    http://www-01.ibm.com/support/docview.wss?uid=swg21408000
  • pavan009
    pavan009
    14 Posts

    Re: Value Prompt with Java Script requirment on static choice

    ‏2013-01-29T13:04:14Z  
    This should help you get started with your own code:

    http://www-01.ibm.com/support/docview.wss?uid=swg21408000
    HI,

    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 ,

    Pavan .
  • DanielWagemann
    DanielWagemann
    411 Posts

    Re: Value Prompt with Java Script requirment on static choice

    ‏2013-01-29T14:37:51Z  
    • pavan009
    • ‏2013-01-29T13:04:14Z
    HI,

    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 ,

    Pavan .
    I 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.
  • pavan009
    pavan009
    14 Posts

    Re: Value Prompt with Java Script requirment on static choice

    ‏2013-01-29T15:16:44Z  
    • pavan009
    • ‏2013-01-29T13:04:14Z
    HI,

    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 ,

    Pavan .
    Hi,

    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.
  • DanielWagemann
    DanielWagemann
    411 Posts

    Re: Value Prompt with Java Script requirment on static choice

    ‏2013-01-29T15:54:03Z  
    • pavan009
    • ‏2013-01-29T15:16:44Z
    Hi,

    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.
    As 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
    SystemAdmin
    15496 Posts

    Re: Value Prompt with Java Script requirment on static choice

    ‏2013-01-29T22:46:51Z  
    • pavan009
    • ‏2013-01-29T15:16:44Z
    Hi,

    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.
    Pavan,
    I am not really expert in JS. if Daniel method not works then contact Sriram.

    http://www.cognosonsteroids.com/2012/01/validate-value-prompt-using-javascript.html

    on this link u will see his email id . he might be able to help you .

    winson.
  • Nandagopal
    Nandagopal
    5 Posts

    Re: Value Prompt with Java Script requirment on static choice

    ‏2013-09-30T20:54:33Z  
    Pavan,
    I am not really expert in JS. if Daniel method not works then contact Sriram.

    http://www.cognosonsteroids.com/2012/01/validate-value-prompt-using-javascript.html

    on this link u will see his email id . he might be able to help you .

    winson.

    This Actually works fine for me..Check it out..

     

    http://www.cognoise.com/index.php?topic=17818.0