delete item

Examples


The delete item statement deletes a string from any type of list field: a list box, multi-select list box, combo box, drop-down list, button drop list or visual switch.

Syntax

delete item expression from {field} window_field

Parameters

expression – An integer that states the position of the item to be deleted, with 1 being the first position in the list.

from – Keyword that must be included in the statement.

field – Optional keyword identifying window_field as a field name.

window_field – The name of the list field from which you’ll delete the item specified in the expression parameter.

Comments

The field must be a window field, not a field in a table. If the position of the item to delete isn’t known, the finditem() function can be used to find it.

If the currently-selected item is removed from the list field, the list field’s value is set to zero. If one item is selected and another item is deleted, the currently-selected item will remain selected, regardless of whether its value has changed. For example, if the third item in a list is selected when the second item is deleted, the third item will remain selected, even though it’s now in position 2 in the list.


Documentation Feedback