Equinox Online Help - Language Reference - A to Z

Home

PickSelection

Applies to
SyntaxPickSelection iIndex, s
Action[Statement] Once items have been selected from a Pick list, they take an index value starting from 1 which is accessed via the first argument iIndex. The equivalent string value of that index is found in the argument s.
ScopeUsable anywhere.
Notes

This statement is used with PickList when PopUpFlags has been set to 64 to create a multi-selectable pick list. PickListSelection has two arguments – the first is the numeric position of the item (in the list of items selected) and the second is the string equivalent of that result.

CategoryPick lists
See Also Pick_PickRecord, PickCaptions, PickColumnWidths, PickFields, PickList, PickListSelection, PickRange_PickRecordRange, PickWrite_PickRecordWrite
Example

This example demonstrates a loop through a list of selected items:

string szName, s
number iSelections, iIndex

PopupTitle "Choose a car"
PopupColour Red, White, Blue, Yellow
PopupFlags 64
PickFields Body_Type, Tested, No_Of_Doors, Engine_Size, Name
PickCaptions "Body", "Tested", "Doors", "Engine", "Name"
PickColumnWidths 10,7,5,10, 15
szName = Pick(Name, Body_Type, GEngineIX)

| Note no. of multiple selections
iSelections = SysResult

| Multiple selections ?
if iSelections > 0 then
iIndex = 1
print "There were <" & iSelections & "> selections made"

| Troll through list of selections
while iIndex < iSelections + 1
PickSelection iIndex, s
print "Selection " & iIndex & " - <" & s & ">"
iIndex = iIndex + 1
end while
else
print "NO MULTI SELECTIONS MADE !"
end if