SBM JavaScript Library Guide → Reference → Field Methods → GetMultiListValues
Gets an array of values from the specified List Box control or from an Embedded Report or Relational Grid widget.
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. |
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. In the case of an Embedded Report widget, the return is an array of row objects. |
Failure | Null or the default value. |
This example returns an array of actual values based on items the user selected in the Sites list box.
GetMultiListValues("Sites", "New York", true);
(none)
Copyright © 2007–2016 Serena Software, Inc. All rights reserved.