COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: cognosdelaware on 20 Jul 2017 10:45:36 AM

Title: How to get the value of which radio button was selected?
Post by: cognosdelaware on 20 Jul 2017 10:45:36 AM
I have the following so far to try to get the value of a radio button, but need help in how do I get the value of the one currently selected?


var oCR = cognos.Report.getReport("_THIS_");
var myPrompt = oCR.prompt.getControlByName("CHOICE");
Title: Re: How to get the value of which radio button was selected?
Post by: cognosdelaware on 01 Aug 2017 07:39:39 AM
"CHOICE" btw is the name of the Value Prompt.
Title: Re: How to get the value of which radio button was selected?
Post by: cognosdelaware on 01 Aug 2017 09:24:43 AM
This is solved.

What I did was to create a global variable and each time the user clicks on the radio button, I set the global variable to a particular value and when I need to, I check this global variable.