selectedLabels

Property is read-only. It cannot be set in script.

Returns the selected labels (not the values) of the component as an array. Applies to multi-value input elements (Check Boxes).

Type

Array

array of selected option labels

Example

var num = CheckBox1.selectedLabels.length;
var msg = 'You selected ' + num + ' objects: ';
msg += CheckBox1.selectedLabels.join(', ');
alert(msg)

Either syntax below can be used in component script:

selectedLabels               // unqualified
Component1.selectedLabels    // qualified

For onInit/onRefresh scripts, and for component and property scripts on other components, the second (qualified) form is required.