FindItem
Previous  Next

Finds an item in the list that its property matches the specified value.
Returns the index of the item.
Returns -1 if no item was found.
Syntax: FindItem (Property As String, Value As String) As Int32
Property - One of the item's properties.
Value - The required value.

Example:
'PimCol is a PimCollection object and Task is a Task object.
Sub Globals
      
End Sub

Sub App_Start
      Form1.Show
      PimCol.New1("tasks")
      Task.New1
      i = PimCol.FindItem("Subject","Start a diet.")
      if i = -1 then
            msgbox("No match was found.")
      else
            Task.Value = PimCol.GetItem(i)
            Task.Complete = true
            Task.Update
      end if
End Sub