Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
CNContact.Name
Queries display name of contact.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
Contacts | 8.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | ✅ Yes |
MBS( "CNContact.Name"; ContactIdentifier ) More
Parameters
Parameter | Description | Example |
---|---|---|
ContactIdentifier | The contact identifier. | "46B1E34D-58F9-4B6B-A80D-0F71ABB87A0E" |
Result
Returns name or error.
Description
Queries display name of contact.Examples
Query your name:
MBS( "CNContact.Name"; MBS( "CNContactStore.UnifiedMeContact" ))
Query name of first contact found with given name:
MBS("CNContact.Name"; GetValue ( MBS( "CNContactStore.ContactsMatchingName"; "Joe Miller" ); 1))
Query names for all contacts:
While(
[
names = "";
// query list of contact IDs
list = MBS( "CNContactStore.Contacts"; 1 );
count = ValueCount(list);
index = 1
] ;
index ≤ count ;
[
id = GetValue(list; index);
// query name for each ID
name = MBS( "CNContact.Name"; id);
names = names & name & ¶;
index = index + 1
] ;
// return all the names
names )
See also
- CNContact.JSON
- CNContact.Show
- CNContact.Value
- CNContactStore.Contacts
- CNContactStore.ContactsMatchingEmailAddress
- CNContactStore.ContactsMatchingName
- CNContactStore.ContactsMatchingURL
- CNContactStore.FetchContact
- CNContactStore.UnifiedMeContact
- CNContainer.Name
Release notes
- Version 10.2
- Fixed a problem with CNContact.Name function and non fetched keys.
Blog Entries
Created 1st August 2018, last changed 14th June 2022