cognos.Prompt.getControlByName
method
Returns the control object associated with a name.
Syntax
(cognos.Prompt.Control) getControlByName(String sName)
Parameters
- {String} sName
Specifies the prompt
name
property set for the control in IBM® Cognos® Analytics - Reporting.
Returns
- {cognos.Prompt.Control}
Object associated to the specified
sName
control. Returnsnull
if the control does not exist.
Example
The following is an example of the clearMyPrompt()
function.
<script type="text/javascript">
function clearMyPrompt() {
var oCR = cognos.Report.getReport("_THIS_");
var myPrompt = oCR.prompt.getControlByName("myPrompt");
myPrompt.clearValues();
}
</script>