Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4   7.5    Statistic  

Addressbook.record.valueForProperty

Returns the value of a given property for a record.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
Addressbook 3.1 Yes No Yes, macOS only No Yes

MBS( "Addressbook.record.valueForProperty"; RecordID; PropertyName )

Parameters

Parameter Description Example value
RecordID The unique ID for the target person or group. $personID
PropertyName The name of the property to query. "EmailProperty"

Result

Returns the value of a given property for a record.

Description

Returns the value of a given property for a record.
Possible property names are UIDProperty, CreationDateProperty, ModificationDateProperty, FirstNameProperty, LastNameProperty, FirstNamePhoneticProperty, LastNamePhoneticProperty, NicknameProperty, MaidenNameProperty, BirthdayProperty, BirthdayComponentsProperty, OrganizationProperty, JobTitleProperty, HomePageProperty, URLsProperty, CalendarURIsProperty, EmailProperty, AddressProperty, OtherDatesProperty, OtherDateComponentsProperty, RelatedNamesProperty, DepartmentProperty, PhoneProperty, AIMInstantProperty, JabberInstantProperty, MSNInstantProperty, YahooInstantProperty, ICQInstantProperty, InstantMessageProperty, SocialProfileProperty, NoteProperty, MiddleNameProperty, MiddleNamePhoneticProperty, TitleProperty, SuffixProperty and GroupNameProperty.

Examples

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" )

See also

Example Databases


Addressbook.record.removeValueForProperty   -   Addressbook.recordsMatchingSearchElement

Feedback: Report problem or ask question.




Links
MBS Xojo Chart Plugins