Add Items to the Collections
From Visual LANSA
Add Items to the Collections
In order to add items to the collection, you need to first create the instances of the objects to be inserted:
Define_Com Class(#Deptment) Name(#Department_Item)
Define_Com Class(#Salary) Name(#Salary_Item)
Define_Com Class(#PostCode) Name(#PostCode_Item)
After the objects have been created, their value is set and they are added to the collections using the Insert method:
Set Com(#Department_Item) Value(#Deptment)
Invoke Method(#Department_Array.Insert) Item(#Department_Item)
Set Com(#Salary_Item) Value(#Salary)
Invoke Method(#Salary_Array.Insert) Item(#Salary_Item)
Set Com(#PostCode_Item) Value(#PostCode)
Invoke Method(#PostCode_Array.Insert) Item(#PostCode_Item)