Add all your array tips to this thread!
(1) Make an array out of a field that is a checkbox:
var myArray = check_field_name.split('\n');
A field that is a check box puts a new line character (\n) between each value in the field.
(2) Determine number of array items:
var myArrayLength = myArray.length;
(3) Array elements start numbering from zero. To access an array element:
var myArrayItem1 = myArray[0];
(4) To loop through the elements of an array:
for ( var i = 0 ; i < myArray.length ; i++ )
{
application.output(myArray[i]);
}
(5) To load a value list with an array:
application.setValueListItems('valueListName', myArray);
“valueListName” needs to already be created as a custom value list.
- david