SetMultiListValues

Sets an array of values in the specified List Box control.

Note: This method supports only Multi-Group, Multi-Relational, Multi-Selection, and Multi-User fields.

Parameters

Name Type Description
objName String The name of the List Box control.
values Array An array of values to set in the List Box control. You can specify display values or internal values. (TS_ID represents the internal value in the database.)
fireEvent String If this parameter is set to "true," then setting the values causes the change event to fire. If this parameter is set to "false," then the change event does not fire.
asValue (optional) String If this parameter is set to "true," then the actual array of values as set in the HTML element are returned instead of display values. If this parameter is set to "false" or is not used, then an array of display values is returned.

In the <option...value="NEW_YORK">New York</option> example, New York is the display value, and NEW_YORK is the actual value.

Return Value

Result Value
(none)  

Examples

This example sets an array of display values based on the Sites list box.

SetMultiListValues("Sites", ["New York", "San Francisco", "Chicago",
"Los Angeles", "Seattle"], true, false);

This example sets an array of internal values based on the Developer list box.

SetMultiListValues("Developers", [213, 214, 215], true, false);

Comments

Before this method can be invoked to populate a searchable Multi-Group, Multi-Relational, Multi-Selection, or Multi-User field, values must be present in the left-hand box on the ListBox control.