selectedObject

Specifies the selected value of the component (not the label). Applies to single-value input elements (Slider, Spinner, Radio Button, Combo Box) and the tabs of co-located components (Tabbed Interface).

To avoid overwriting an existing setting (saved by the designer, or saved by the user in a bookmark), test to see if the component value has already been set before using selectedObject. See selectedObjects for an example of such a test.

Type

Value of the selected option

Examples
// Set a RadioButton with data type  ‘String’:
RadioButton1.selectedObject = 'NJ';

// Set a ComboBox with data type  ‘Date’:
ComboBox1.selectedObject = new Date(2020,5,23);

Either syntax below can be used in component script:

selectedObject               // unqualified
Component1.selectedObject    // qualified

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