GetMultiListValues

Gets an array of values from the specified List Box control or from a Relational Grid widget.

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 or widget.
defaultValue (optional) String The default value or array of values to return if the user did not select at least one list box value or row, or if the control does not exist on the form. If this parameter is not provided, "null "is returned.
Note: If the defaultValue is a single string value, it is converted to a single-element array.
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. For widgets, "true" returns an array of objects, each of which is a row.

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
Success An array of strings representing the display value or actual value of each selected item in the List Box control. For widgets, an array of objects representing selected rows is returned.
Failure Null or the default value.

Examples

This example returns an array of actual values based on items the user selected in the Sites list box.

GetMultiListValues("Sites", "New York", true);

Comments

(none)