Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
10.1
10.2
10.3
10.4
10.5
11.0
11.1
11.2
11.3
11.4
Statistic
FMM
Blog
Sets the value of a contact.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
Contacts | 8.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | ✅ Yes |
Parameter | Description | Example |
---|---|---|
ContactIdentifier | The contact identifier. | "46B1E34D-58F9-4B6B-A80D-0F71ABB87A0E" |
Selector | Which value to set. | "givenName" |
Value | The value to set. | "Test" |
Returns OK or error.
Set given name fo ra contact:
Set Variable [ $r ; Value: MBS( "CNContact.SetValue"; $contactID; "givenName"; "Joe" ) ]
Clear email for contact:
// first set email list to empty JSON array:
MBS( "CNContact.SetValue"; "BD2307E5-92F6-4A8F-946D-C4804615C18B:ABPerson"; "emailAddresses"; "[]") &
// and save
MBS( "CNContactStore.UpdateContact"; "BD2307E5-92F6-4A8F-946D-C4804615C18B:ABPerson" )
Set email list with two emails:
// set email address list:
MBS( "CNContact.Value"; "BD2307E5-92F6-4A8F-946D-C4804615C18B:ABPerson"; "emailAddresses"; "[{ \"label\" : \"_$!<Home>!$_\", \"value\" : \"home@test.de\" }, { \"label\" : \"My Label\", \"value\" : \"private@test.de\" } ]") &
// and save
MBS( "CNContactStore.UpdateContact"; "BD2307E5-92F6-4A8F-946D-C4804615C18B:ABPerson" )
Set birthday:
Set Variable [ $r ; Value: MBS( "CNContact.SetValue"; $contactID;"Birthday"; "{\"day\":\"27\",\"month\":\"12\",\"year\":\"1963\"}") ]
Created 1st August 2018, last changed 4th May 2020
CNContact.Name - CNContact.Show
Feedback: Report problem or ask question.