JavaScript
listObj.indexFromValue Method
Syntax
listObj.indexFromValue(value);
Arguments
- valuestring
The value to return the zero-based row index in the List.
Returns
- resultnumber
Returns the row number that contains the given row 'value'. If the value is not found, -1 is returned.
Description
Returns the zero-based row number for a given row 'value'. If the value is not found, -1 is returned.
Example
var listObj = {dialog.object}.getControl('list1'); if (listObj) { //assume the List was set to return the value in the 'Lastname' field. //get the row number for the row with the value of 'Smith' var index = listObj.indexFromValue('Smith'); }