| Components | All | New | MacOS | Windows | Linux | iOS | ||||
| Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old | |
CNContactPicker.SetDisplayedKeys
Sets what keys to display in the picker.
| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
| Contacts | 16.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | ✅ Yes |
MBS( "CNContactPicker.SetDisplayedKeys"; Keys ) More
Parameters
| Parameter | Description | Example |
|---|---|---|
| Keys | The list of keys to show. Default is an empty list to show the default key list. |
Result
Returns OK or error.
Description
Sets what keys to display in the picker.The key list may include the following names: type, namePrefix, givenName, middleName, familyName, previousFamilyName, nameSuffix, nickname, organizationName, departmentName, jobTitle, phoneticGivenName, phoneticMiddleName, phoneticFamilyName, phoneticOrganizationName, note, imageData, thumbnailImageData, imageDataAvailable, phoneNumbers, emailAddresses, postalAddresses, urlAddresses, contactRelations, socialProfiles, instantMessageAddresses, dates, birthday, nonGregorianBirthday.
Examples
Set default selection:
Set Variable [ $r ; Value: MBS( "CNContactPicker.SetDisplayedKeys"; "") ]
Set to show phone numbers:
Set Variable [ $r ; Value: MBS( "CNContactPicker.SetDisplayedKeys"; "phoneNumbers") ]
Show picker to pick an address:
Set Variable [ $r ; Value: MBS( "CNContactPicker.SetDisplayedKeys"; "postalAddresses") ]
Set Variable [ $r ; Value: MBS( "CNContactPicker.SetTrigger"; Get(FileName); "PickedProperty") ]
Set Variable [ $r ; Value: MBS( "CNContactPicker.Show") ]
If [ MBS("IsError") ]
Show Custom Dialog [ "Failed to show picker" ; $r ]
End If
Set Variable [ $r ; Value: MBS( "CNContactPicker.SetTrigger"; Get(FileName); "PickedProperty") ]
Set Variable [ $r ; Value: MBS( "CNContactPicker.Show") ]
If [ MBS("IsError") ]
Show Custom Dialog [ "Failed to show picker" ; $r ]
End If
See also
Release notes
- Version 16.3
- Added CNContactPicker.GetDisplayedKeys and CNContactPicker.SetDisplayedKeys functions.
This function is free to use.
Created 14th May 2026, last changed 18th May 2026
CNContactPicker.GetDisplayedKeys - CNContactPicker.SetTrigger