Displays the list of contacts found on the device (Android, iPhone or iPad, Universal Windows). The user has the ability to select one of the contacts.
gCurrentContact is Contact
// Selects a contact and dials the phone numbers of this contact
// (using the contact variable)
IF ContactSelect(gCurrentContact) = True THEN
tel is Phone
FOR EACH tel OF gCurrentContact.PhoneNumber
IF tel.Type = phoneCellWork OR tel.Type = phoneWork THEN
<Result> = ContactSelect(<Contact>)
- True if a contact was selected,
- False otherwise. To get more details on the error, use ErrorInfo.
<Contact>: Contact variable
Name of the Contact variable to be specified with the characteristics of the selected contact.
- If the user selects a contact, the Contact variable is automatically populated with the details of the selected contact.
- ContactSelect blocks execution until the user selects a contact or leaves the selection window.
- ContactSelect can be used in the emulator. It cannot be used in the simulator.
Application in the background: Specific case from Android 10
From Android 10, it is no longer possible to open a window when the application is in the background.
ContactSelect can open a window. If this function is used while the application is in the background, a fatal error will occur.
- It is possible to determine if the application is in the background using InBackgroundMode.
- If an application needs to interact with the user while it is in the background, the solution is to display a notification (via the Notification type). The application will be brought back to the foreground when the notification is clicked, if the ActivateApplication property is set to True. You can also open a window from the procedure passed to the ActionClick property.
Required application feature
When this function is used, an application feature is declared in the application generation wizard.
Required feature: Contacts
This feature allows the applications to access the contacts.
Business / UI classification: Business Logic