Work with the Collection Items

Visual LANSA

Work with the Collection Items

Individual items in the collection are accessed using a For/EndFor loop.

The click event of the Show button iterates through the collection referencing each entry in the collection by using a For/EndFor loop to retrieve the value of  #FullName of the individual employees to a message box:

 

For Each(#EmployeeFullName) In(#Employee)
Use Builtin(MESSAGE_BOX_ADD) With_Args('Employee' #EMPLOYEEFULLNAME.VALUE 'was found in the collection.')
Endfor

 

Ý Example 1: Create a Keyed Collection