Skip to main content

getValue()

gets id(s) of items from data collection selected in ComboBox

getValue(asArray?: boolean): Id | Id[];

Parameters:

asArray: boolean - true, to return ids as an array of strings

Returns:

A string, number, or array that contains id(s) of options selected in ComboBox.

Example

var id = combo.getValue();
// -> "u1556098582074"

// returns ids of selected options as strings
var ids = combo.getValue();
// -> "u1556097609214,u1556097609228,u1556097609244"

// returns ids of selected options as an array of strings
var array_ids = combo.getValue(true);
// -> ["u1556097609214", "u1556097609228", "u1556097609244"]

Related sample: Combobox. Get Value