CNContactStore.Containers
-------------------------

Queries identifiers of all containers.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Contacts](component_Contacts.md) | [8.4](newinversion84.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ✅ Yes |

MBS( "CNContactStore.Containers" ) ### Parameters

none

### Result

Returns list or error.

### Description

Queries identifiers of all containers.  
This should return list of accounts for contacts.  
### Examples

Query all accounts:

 MBS ( "CNContactStore.Containers" )  
<small>  
Example result:   
9892A5CC-964E-497A-B877-A47619F7493C:ABAccount  
\_local</small>Queries container types:

 While(   
\[   
 names = "";   
 // query list of containers 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](CNContainerName.md)"; id);   
 type = MBS ( "[CNContainer.Type](CNContainerType.md)"; id);   
 names = names &amp; name &amp; " -&gt; " &amp; type &amp; ¶;   
 index = index + 1   
\] ;   
// return all the names  
names )  
### See also

- [CNContactStore.Contacts](CNContactStoreContacts.md)
- [CNContactStore.Country](CNContactStoreCountry.md)
- [CNContainer.Name](CNContainerName.md)
- [CNContainer.Type](CNContainerType.md)

### Blog Entries

- [MBS FileMaker Plugin, version 8.4pr3](https://www.mbsplugins.de/archive/2018-08-16/MBS_FileMaker_Plugin_version_8/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 15th August 2018 , last changed 14th June 2022

  
[CNContactStore.ContainerForGroup](CNContactStoreContainerForGroup.md) - [CNContactStore.Country](CNContactStoreCountry.md)

[HTML Version](CNContactStoreContainers.shtml)