cognos.Prompt.Control.setValues method
Resets the control and adds an array of values to a control.
If the control doesn't support multiple values, only the first value provided is used. This is a convenience method that issues consecutive calls to clearValues() and addValues().
Syntax
{cognos.Value[]} aValues
Parameters
- {cognos.Value[]} aValues
New values to use for this control.
Returns
{void}
Example
function setPromptValue( promptName, value ) {
var oCR = cognos.Report.getReport(“_THIS_”);
var oP = oCR.prompt. getControlByName( promptName );
oP.setValues( oValues );
}
oValues = [{’use’: ’ca’, ’display’: ’Canada’},
{’use’: ’us’, ’display’: ’USA’}];
setPromptValue( ’countries’, oValues );