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
Returns the value of a given property for a record.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
Addressbook | 3.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | ✅ Yes |
This function was deprecated. Use Contacts functions instead.
Parameter | Description | Example |
---|---|---|
RecordID | The unique ID for the target person or group. | $personID |
PropertyName | The name of the property to query. | "EmailProperty" |
Returns the value of a given property for a record.
Query first name of a person:
MBS( "Addressbook.record.valueForProperty"; $personID; "FirstNameProperty" )
Query group name of a group:
MBS( "Addressbook.record.valueForProperty"; "57956420-03A4-4C09-8219-6874B897D25F:ABGroup"; "GroupName" )
Query my ID:
MBS( "Addressbook.record.valueForProperty"; MBS( "Addressbook.me") ; "UIDProperty" )
Query creation date of my record:
MBS( "Addressbook.record.valueForProperty"; MBS( "Addressbook.me") ; "CreationDateProperty" )
Query birthday of my record:
MBS( "Addressbook.record.valueForProperty"; MBS( "Addressbook.me") ; "BirthdayProperty" )
Query birthday components for my record:
MBS( "Addressbook.record.valueForProperty"; MBS( "Addressbook.me") ; "BirthdayComponentsProperty" )
Query my company name:
MBS( "Addressbook.record.valueForProperty"; MBS( "Addressbook.me") ; "OrganizationProperty" )
Query my job title:
MBS( "Addressbook.record.valueForProperty"; MBS( "Addressbook.me") ; "JobTitleProperty" )
Query my department:
MBS( "Addressbook.record.valueForProperty"; MBS( "Addressbook.me") ; "DepartmentProperty" )
Query my note:
MBS( "Addressbook.record.valueForProperty"; MBS( "Addressbook.me") ; "NoteProperty" )
Query all my URLs:
Set Variable [$personID; Value:MBS( "Addressbook.me")]
Set Variable [$Urls; Value:MBS( "Addressbook.record.valueForProperty"; $personID; "URLsProperty")]
Set Variable [$count; Value:MBS( "Addressbook.multivalue.count")]
If [$count > 0]
#for loop
Set Variable [$index; Value:0]
Loop
Set Variable [$value; Value:MBS( "Addressbook.multivalue.valueAtIndex"; $index)]
Show Custom Dialog ["URL"; $value]
#next
Set Variable [$index; Value:$index + 1]
Exit Loop If [$index = $count]
End Loop
End If
Shows different emails:
Set Variable [$personID; Value:"637FA922-7A2B-4F9A-BFA3-023253D4A3D5:ABPerson"]
Set Variable [$r; Value:MBS( "Addressbook.record.valueForProperty"; $personID; "EmailProperty" )]
Set Variable [$w; Value:MBS( "Addressbook.multivalue.valueForLabel"; "EmailWorkLabel" )]
Set Variable [$h; Value:MBS( "Addressbook.multivalue.valueForLabel"; "EmailHomeLabel" )]
Set Variable [$o; Value:MBS( "Addressbook.multivalue.valueForLabel"; "OtherLabel" )]
Show Custom Dialog ["Emails"; "Work email: " & $w & ¶ & "Home email: " & $h & ¶ & "Other email: " & $o]
# there may be more than 3 labels!
Show note of an user:
MBS( "Addressbook.record.valueForProperty"; "637FA922-7A2B-4F9A-BFA3-023253D4A3D5:ABPerson"; "NoteProperty" )
Query an address:
# Find someone...
Set Variable [ $personID ; Value: MBS( "Addressbook.searchPeopleWithName"; "Jon"; "Test" ) ]
If [ Length($personID) > 0 ]
# get Address
Set Variable [ $r ; Value: MBS( "Addressbook.record.valueForProperty"; $personID; "AddressProperty" ) ]
Set Variable [ $Address ; Value: MBS( "Addressbook.multivalue.valueAtIndex"; 0) ]
Show Custom Dialog [ "Address" ; $Address ]
End If
Example result:
Street=Some street. 123
Zip=12345
Country=Deutschland
City=Test
This function checks for a license.
Created 18th August 2014, last changed 9th December 2019
Addressbook.record.removeValueForProperty - Addressbook.recordsMatchingSearchElement