Add Items to the Collection

Visual LANSA

Add Items to the Collection

The code to create a new form B in the collection is contained in the Click event of the Create a Form B button:

 

Change Field(#LISTCOUNT) To('#FormBs.ItemCount + 1')

Invoke Method(#FormBs<#listcount>.showform)

 

In the above note that:

  • The keyed collection property ItemCount is used to get the next slot in the collection
  • When the form is created and added to the collection when it is first shown.

Ý Example 3: Collection to Manage Forms