True if this item is currently selected
Member of List View Item (PRIM_LVIT)
Data Type - Boolean
Selected will return True if the item is selected. All list controls allow one or more items to be selected using the keyboard, mouse or programtically. Actions can then be performed on the set of selected items.
In this example, a list is being processed and a total salary prepared for the selected items. SELECTLIST is needed here to ensure the field values are returned as the items are processed.
SelectList Named(#List) Continue (*Not #List.Currentitem.Selected) #Total += #Salary Endselect
In this example, selection state is being reversed. FOR can be used here as no access to the field values is required.
For Each(#Item) In(#List.Items) #Item.Selected := *not #Item.Selected Endfor
LANSA Version 15, April 2020