I am having trouble getting the FindContactsByPhone method to return anything. In the example below, I know I have the phone number in my contacts (I changed it to protect the innocent in this example) but it never returns the contact.
Please help.
Sub UpdateContacts
Dim fI As String
Dim TR As TextReader
Dim i As Int
Dim tEmpName As String
Dim tCell As String
Dim tMail As String
Dim cu As ContactsUtils
Dim c As cuContact
Dim cup As cuPhone
Dim phoneList As List
cu.Initialize
phoneList.Initialize
fI = "PMC/Contacts.txt"
TR.Initialize(File.OpenInput(File.DirRootExternal,fI))
rLine = TR.ReadLine
Do While rLine <> Null
POVendRec.NumPOs = s.Right(rLine,5)
tEmpName = s.Rtrim(s.Mid(rLine,14,30))
tCell = s.Rtrim(s.Mid(rLine,44,15))
tMail = s.Rtrim(s.Mid(rLine,59,45))
Msgbox(tCell,"tCell")
phoneList.Clear
phoneList = cu.FindContactsByPhone("5035551212", False, True)
Msgbox(phoneList.Size,"")
For i = 0 To phoneList.Size - 1
Msgbox(phoneList.get(i),"")
Next
rLine = TR.ReadLine
Loop
TR.Close
End Sub
Please help.
Sub UpdateContacts
Dim fI As String
Dim TR As TextReader
Dim i As Int
Dim tEmpName As String
Dim tCell As String
Dim tMail As String
Dim cu As ContactsUtils
Dim c As cuContact
Dim cup As cuPhone
Dim phoneList As List
cu.Initialize
phoneList.Initialize
fI = "PMC/Contacts.txt"
TR.Initialize(File.OpenInput(File.DirRootExternal,fI))
rLine = TR.ReadLine
Do While rLine <> Null
POVendRec.NumPOs = s.Right(rLine,5)
tEmpName = s.Rtrim(s.Mid(rLine,14,30))
tCell = s.Rtrim(s.Mid(rLine,44,15))
tMail = s.Rtrim(s.Mid(rLine,59,45))
Msgbox(tCell,"tCell")
phoneList.Clear
phoneList = cu.FindContactsByPhone("5035551212", False, True)
Msgbox(phoneList.Size,"")
For i = 0 To phoneList.Size - 1
Msgbox(phoneList.get(i),"")
Next
rLine = TR.ReadLine
Loop
TR.Close
End Sub