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:
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
13.5
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 | Flags |
---|---|---|---|
ContactIdentifier | The contact identifier. | "46B1E34D-58F9-4B6B-A80D-0F71ABB87A0E" | |
Selector | Which value to set. | "givenName" | |
Value | The value to set. | "Test" | Optional |
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\"}") ]
Set contact to be organization:
Set Variable [ $r ; Value: MBS( "CNContact.SetValue"; $contactID; "Type"; "Organization") ]
Set notes field for contact:
Set Variable [ $r ; Value: MBS( "CNContact.SetValue"; $contactID; "Note"; "Hello World!") ]
# required additional entitlements for FileMaker and may not work in macOS Ventura.
This function checks for a license.
Created 1st August 2018, last changed 27th February 2023