cognos.Prompt.Control.addValues method

Add an array of values to a control.

If the control does not support multiple values, only the first one provided is used.

Syntax

{void} addValues(aValues) 

Parameters

{cognos.Value[]} aValues

The new values to use for this control.

Returns

{void}

Example

This example adds an array of two values (use and display) to a prompt.

var oCR = cognos.Report.getReport(“_THIS_”);
function setPromptValue( promptName, useValue, displayValue ) {
	var oP = oCR.prompt. getControlByName( promptName );
	var oValue = {’use’: useValue, ’display’: displayValue };
	oP.addValues( [oValues] );
}
setPromptValue ( ’country’, ’ca’, ’Canada’);