Sorted Array Collection Example

Visual LANSA

Sorted Array Collection Example

Sorted array collections are a dynamically sized, sorted collection of components that can be located by indexing. Indexing is always relative to 1.

In this example a form invokes a reusable part that returns a an array collection that has been sorted into the order you requested.  The example also uses an employee reusable part which is used to store employee details.

Type in the name of the field on which you want the list sorted and then click the "Get List" Push button to display the sorted list. The fields you can sort by are EMPNO, SURNAME, GIVENAME, POSTCODE, SALARY, and DEPTMENT.

Define the Collection and Adding Items to It

Retrieve the Items in the Collection

Source for Sorted Array Collection Example

Ý 6.22.4 Other Optimized Collections