ISList.Insert

Description

This function adds objects to the list in the reverse order.

Syntax

object.Insert aIndex, aObject

Part Attribute Type Description
object Required
The object always implements the ISList interface
aIndex In, Required
int
The index of the object to be inserted
aObject In, Required
object
The object to be inserted

Example

Add the user-selected patients to the list in the reverse order and display their full names.

Dim aList
Dim aPatient
Dim aMessage

Set aList = Profile.CreateList

const aPatientCount = 2
for i = 1 to aPatientCount 
  set aPatient = Profile.SelectPatient
  aList.Insert 0, aPatient
next

aMessage = "The number of patients in the list is " &  aList.Count
for i = 0 to aList.Count - 1 
  set aPatient = aList.Item(i)
  aMessage = aMessage & vbNewLine & " - " & aPatient.SurnameFirstName
next

Profile.MsgBox(aMessage)
Note:

Version information

Added in v7.8.0