Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Guides   Examples
New in version: 7.1   7.2   7.3   7.4   7.5   8.0   8.1   8.2   8.3   8.4    Statistic  

CNContact.Value

Queries the value of contact.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
Contacts 8.4 Yes No No No Yes

MBS( "CNContact.Value"; ContactIdentifier; Selector { ; ImageType; FileName } )

Parameters

Parameter Description Example value
ContactIdentifier The contact identifier. "46B1E34D-58F9-4B6B-A80D-0F71ABB87A0E"
Selector Which value to return. "nickname"
ImageType Optional
The type of image to return. Either JPEG, PNG, GIF or BMP. Default is JPEG.
"JPEG"
FileName Optional
The filename to use for the picture. Default is "image" with the extension matching the image type.
"test.jpg"

Result

Returns value or error.

Description

Queries the value of contact.
Selector can be birthday, contactRelations, dates, departmentName, emailAddresses, familyName, givenName, imageData, imageDataAvailable, instantMessageAddresses, jobTitle, middleName, namePrefix, nameSuffix, nickname, nonGregorianBirthday, organizationName, phoneNumbers, phoneticFamilyName, phoneticGivenName, phoneticMiddleName, phoneticOrganizationName, postalAddresses, previousFamilyName, socialProfiles, thumbnailImageData, note, type or urlAddresses.
ImageData and thumbnailImageData are returned as container and you can pass in ImageType and FileName to use.
PhoneNumbers, emailAddresses, postalAddresses, urlAddresses, contactRelations, socialProfiles, instantMessageAddresses, dates, birthday and nonGregorianBirthday are returned as JSON.

Examples

Get my phone numbers:

MBS("CNContact.Value"; MBS("CNContactStore.UnifiedMeContact"); "phonenumbers")

Example result:
[
{
"identifier" : "7AA474C5-CB5B-406F-9C19-077E14E8F48B",
"label" : "_$!<Mobile>!$_",
"value" : "+49 1234 56789"
},
{
"identifier" : "96F71635-B932-49C5-ABA6-905528A152D0",
"label" : "_$!<Work>!$_",
"value" : "+49 1234 56789"
}
]

Get my social profiles:

MBS("CNContact.Value"; MBS("CNContactStore.UnifiedMeContact"); "socialprofiles")

Example result:
[
{
"identifier" : "DC992125-7999-4C52-ADF6-D544BC3ADA04",
"label" : "Twitter",
"value" : {
"username" : "MBSPlugins",
"userIdentifier" : null,
"service" : "Twitter",
"urlString" : "http:\/\/twitter.com\/MBSPlugins"
}
},
{
"identifier" : "4D26EDF7-EE68-4125-AAF1-C79C5D4A66AA",
"label" : "Facebook",
"value" : {
"username" : "MonkeybreadSoftware",
"userIdentifier" : null,
"service" : "Facebook",
"urlString" : "http:\/\/facebook.com\/MonkeybreadSoftware"
}
}
]

Get image of contact as container value:

MBS( "CNContact.Value"; $contact; "imageData")

See also

Created 1st August 2018, last changed 29th August 2018


CNContact.ShowInAddressbook   -   CNContactStore.AddContact

Feedback: Report problem or ask question.




Links
MBS Xojo Chart Plugins