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: 9.5   10.0   10.1   10.2   10.3   10.4   10.5   11.0   11.1   11.2    Statistic    FMM    Blog  

Addressbook.multivalue.count

Returns the number of entries in a multivalue list.

Component Version macOS Windows Linux Server iOS SDK
Addressbook 3.1 ✅ Yes ❌ No ❌ No ❌ No ✅ Yes

Deprecated

This function was deprecated. Use Contacts functions instead.

MBS( "Addressbook.multivalue.count" )

Parameters

none

Result

Returns count.

Description

Returns the number of entries in a multivalue list.

Examples

Query number of emails:

$personID = MBS( "Addressbook.me" )
$r = MBS( "Addressbook.record.valueForProperty"; $personID; "EmailProperty" )
$count = MBS( "Addressbook.multivalue.count")

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

See also

Example Databases

Blog Entries

Created 18th August 2014, last changed 26th February 2016


Addressbook.multivalue.addValue - Addressbook.multivalue.identifierAtIndex

Feedback: Report problem or ask question.