CNGroup.Name
------------

Queries group name.

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

MBS( "CNGroup.Name"; GroupIdentifier ) 

**MBS**( **"CNGroup.Name";** /\* Queries group name. \*/  
**$GroupIdentifier**) /\* The group identifier.  
Can be identifier or group name.e.g. "F527BF7C-6426-4D48-86CA-CB5E57743FFE:ABGroup" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| GroupIdentifier | The group identifier.   Can be identifier or group name. | "F527BF7C-6426-4D48-86CA-CB5E57743FFE:ABGroup" |

### Result

Returns text or error.

### Description

Queries group name.  
### Examples

Queries group names:

 While(   
\[   
 names = "";   
 // query list of group IDs  
 list = MBS ( "[CNContactStore.Groups](CNContactStoreGroups.md)" );   
 count = ValueCount(list);   
 index = 1  
\] ;   
 index ≤ count ;   
\[   
 id = GetValue(list; index);   
 // query name for each ID  
 name = MBS ( "CNGroup.Name"; id);   
 names = names &amp; id &amp; " -&gt; " &amp; name &amp; ¶;   
 index = index + 1   
\] ;   
// return all the names  
names )  
<small>  
Example result:   
009ACB1E-1A27-444B-1000-43EC9B2F420B:ABGroup -&gt; Christmas Cards  
036104A1-BFD4-498C-2E55-BC6E442F7265:ABGroup -&gt; Friends  
391726FA-6B46-479E-38F5-E4B187809300:ABGroup -&gt; Family  
7A47A8BC-FA88-47CB-4CB2-5A1A1290ED94:ABGroup -&gt; Work</small>### See also

- [CNContactStore.Groups](CNContactStoreGroups.md)

### Example Databases

- [Mac and iOS/Contacts/Contacts](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/Contacts/Contacts.shtml#4ScriptAnchor_)

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

  
[CNContainer.Type](CNContainerType.md) - [CUPS.CancelJob](CUPSCancelJob.md)

[HTML Version](CNGroupName.shtml)