Gets an array of contacts from Pocket Outlook after optionally filtering the array for matching criteria.

POOM objects
Integer objectname.GetContacts ({matchcriteria,} contacts [ ] )
Argument |
Description |
|---|---|
objectname |
The name of the POOM object |
matchcriteria |
A string describing criteria you want to use to filter the list of contacts |
contacts |
An array of POOMContacts passed by reference |
Integer. Returns 1 for success and one of the following negative values if an error occurs:
-2 Cannot connect to the repository or a required internal subobject failed to connect to the repository
A user must be logged in to a POOM object to get contacts from Pocket Outlook.
The following example retrieves contacts that match the criterion that the contact’s Department property is Finance, and writes their names, phone numbers, and e-mail addresses to a list box:
// global variable: g_poom
integer li_rc
POOMContact contactArray[]
POOMContact contact
String sCriteria = "[Department] = ~"Finance~""
DateTime dt
int idx
li_rc = g_poom.GetContacts( sCriteria, contactArray )
lb_res.AddItem( "Contact[] ret: " + string(li_rc) )
FOR idx=1 to UPPERBOUND(contactArray)
contact = contactArray[idx]
lb_res.AddItem( "Contact(" + string(idx) + ")")
lb_res.AddItem( "First: " + contact.FirstName )
lb_res.AddItem( "Last: " + contact.LastName )
lb_res.AddItem( "Phone1: " + &
contact.businesstelephonenumber )
lb_res.AddItem("E-Mai1 1: " + contact.email1address)
NEXT
lb_res.SelectItem( lb_res.TotalItems() )