Skip to main content

getValue()

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

getValue(asArray?: boolean): string | number | (string | number)[];

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

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

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

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

Related sample: Combobox. Get value