Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

CNContainer.Type

Queries type of container.

Component Version macOS Windows Linux Server iOS SDK
Contacts 8.4 ✅ Yes ❌ No ❌ No ❌ No ✅ Yes
MBS( "CNContainer.Type"; ContainerIdentifier )   More

Parameters

Parameter Description Example
ContainerIdentifier The identifier for the container. "9892A5CC-964E-497A-B877-A47619F7493C:ABAccount"

Result

Returns type or error.

Description

Queries type of container.
Type can be Unassigned, Local, Exchange or CardDAV.

Examples

Queries container types:

While(
[
    names = "";
    // query list of container IDs
    list = MBS( "CNContactStore.Containers" );
    count = ValueCount(list);
    index = 1
] ;
    index ≤ count ;
[
    id = GetValue(list; index);
    // query name for each ID
    name = MBS( "CNContainer.Name"; id);
    type = MBS( "CNContainer.Type"; id);
    names = names & name & " -> " & type & ¶;
    index = index + 1
] ;
// return all the names
names )

Example result:
Mac.com -> CardDAV
Auf meinem Mac -> Local

See also

Created 1st August 2018, last changed 14th June 2022


CNContainer.Name - CNGroup.Name