ISList.IndexOf

Description

The indexes of the objects in the list.

Syntax

object.IndexOf(aValue)

Part Attribute Type Description
object Required
The object always implements the ISList interface
aValue In, Required
object
The index of the item in the list

Return Value

int

Returns the indexes of the patients.

Example

Fill in the list with the user-selected patients and display the number of the patients in the list and their indexes.

Dim aList
Dim aPatient
Dim aMessage
Dim i

Set aList = Profile.CreateList

const aPatientCount = 2
for i = 0 to aPatientCount - 1 
  set aPatient = Profile.SelectPatient
  aList.Add(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)
  aIndexof = aList.IndexOf(aPatient)
  aMessage = aMessage & vbNewLine & " - " & aPatient.SurnameFirstName & " (" &_
    aIndexof & ")"
next

Profile.MsgBox(aMessage)
Note:

Version information

Added in v7.8.0