Retrieve the Values from the Collections

Visual LANSA

Retrieve the Values from the Collections

The values stored for an employee in the collections are retrieved when an employee is selected in the list.  The array collections are in the same order as the entries in the list view so we can use the list view entry number as the index to get the values from the array collections:

 

Change Field(#USE_INDEX) To('#EMP_LIST.CURRENTITEM.ENTRY')

 

The values in the array collection are then assigned to the Department, Salary and PostCode fields:

 

Set Com(#Deptment) Value(#Department_Array.Item<#Use_Index>.Value)
Set Com(#Salary) Value(#Salary_Array.Item<#Use_Index>.Value)
Set Com(#PostCode) Value(#PostCode_Array.Item<#Use_Index>.Value)

 

Ý Array Collection Example