SBM JavaScript Library Guide → Reference → Field Methods → SetFieldValues
Sets an array of values for the specified field.
Name | Type | Description |
---|---|---|
fieldName | String | The name of the field. |
value | Array |
The array of values to set on the field. If the field is a Combo Box or List Box, the value must match the value of an item already in the list, and is case-sensitive. |
Result | Value |
---|---|
(none) |
This example sets the array of string values for the field:
SetFieldValues("Numbers", ["one", "two", "three", "four", "five"]);
SetFieldValues is typically used with Multi-Group, Multi-Relational, Multi-Selection, and Multi-User fields. If this method is used with other field types, it sets the field to the first value in the array.
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.
Copyright © 2007–2016 Serena Software, Inc. All rights reserved.