Choice (ComboBox) Methods (inherits Item)

number currentItem ( number row )

Get current item

The currently selected item is counted from zero. Note that if the noblank option is set, then item zero is the first real value; if not then it is the entry corresponding to a null value.

void setCurrentItem ( number row, number item )

Update current item

Sets the current item. Note that if the noblank option is set, then item zero is the first real value; if not then it is the entry corresponding to a null value.

void setValues ( list values )

Load set of choices

This method can be used to set the list of values displayed in the choice control. Note that this list should only contain the real values; Rekall will add an extra item corresponding to a null value depending on whether the noblank property is set.

list getValues ( )

Get current set of choices

This method retrieves the current values that appear in the choice control. Note that this list only contains the real values, and will not contain an entry corresponding to a null value. A side-effect of this is that, depending on whether the noblank property is set, a value returned by the currentItem method may be offset by one relative to the values returned.

number getNumValues ( )

Get current number choices

This method retrieves the number of choices that appear in the control, except that the entry corresponding to the null value is not counted. Hence, unless the noblank property is set, this value will be one less than the actual number of entries in the choice control.

void setValuesFromQuery ( string query, list args, number rowNum )

Set values from a query

The query is executed, set set of choices set to the first value from each record returned; a null value will be prepended unless the No Blank property is set. If the row number is not given, then the current query row is used.