Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

CNContact.JSON

Queries contact as JSON.

Component Version macOS Windows Linux Server iOS SDK
Contacts 8.4 ✅ Yes ❌ No ❌ No ❌ No ✅ Yes
MBS( "CNContact.JSON"; ContactIdentifier { ; SkipImage } )   More

Parameters

Parameter Description Example Flags
ContactIdentifier The contact identifier. "46B1E34D-58F9-4B6B-A80D-0F71ABB87A0E"
SkipImage Available in MBS FileMaker Plugin 8.5 or newer.
If you pass 1, we skip the images.
Default is 0 to include images.
1 Optional

Result

Returns JSON or error.

Description

Queries contact as JSON.
If the application is not properly code signed with entitlements, you may only get limited data like no phone numbers.

Examples

Query your JSON:

MBS( "CNContact.JSON"; MBS( "CNContactStore.UnifiedMeContact" ) )

Get formatted and colored JSON:

Set Variable [ $json ; Value: MBS( "CNContact.JSON"; MBS( "CNContactStore.UnifiedMeContact" ) ) ]
Set Variable [ $json ; Value: MBS("JSON.Colorize"; MBS( "JSON.Format"; $json) ) ]
Set Field [ Contacts::Result ; $json ]

Get JSON of a person:

Let([
contacts = MBS( "CNContactStore.ContactsMatchingName"; "Christian Schmitz" );
contactID = GetValue(contacts; 1);
json = MBS( "CNContact.JSON"; contactID; 1 )
];json)

See also

Release notes

  • Version 13.4
  • Version 13.2
    • Added identifier value to the JSON returned by CNContact.JSON function.
  • Version 8.5

Example Databases

Blog Entries

Created 1st August 2018, last changed 9th February 2022


CNContact.IsUnifiedWithContact - CNContact.MailingAddress