Addressbook.groups
------------------

Returns an array of all the groups in the Address Book database.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Addressbook](component_Addressbook.md) | [3.1](newinversion31.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ✅ Yes |

### Deprecated

This function was [deprecated](deprecated.md). Use [Contacts](component_Contacts.md) functions instead.

MBS( "Addressbook.groups" { ; Account } ) 

**MBS**( **"Addressbook.groups";** /\* Returns an array of all the groups in the Address Book database. \*/  
**$Account**) /\* Optional; The account identifier to limit search for.e.g. \_local \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| Account | The account identifier to limit search for. | \_local | Optional |

### Result

Returns list of group IDs.

### Description

Returns an array of all the groups in the Address Book database.  
If the database doesn't contain any groups, this method returns an empty array.  
  
You can use [Addressbook.record.displayname](Addressbookrecorddisplayname.md) to find the display name of a group. Or you query the group name property with [Addressbook.record.valueForProperty](AddressbookrecordvalueForProperty.md).  
### Examples

Query list of group IDs:

 MBS ( "Addressbook.groups" )  
Query display name of first group:

 MBS ( "[Addressbook.record.displayname](Addressbookrecorddisplayname.md)"; ElementLeft ( MBS ( "Addressbook.groups" ) ; 1 ))  
### See also

- [Addressbook.NewGroup](AddressbookNewGroup.md)
- [Addressbook.people](Addressbookpeople.md)
- [Addressbook.record.displayname](Addressbookrecorddisplayname.md)
- [Addressbook.record.valueForProperty](AddressbookrecordvalueForProperty.md)

### Blog Entries

- [Filemaker and the Mac OS X Addressbook](https://www.mbsplugins.de/archive/2013-05-04/Filemaker_and_the_Mac_OS_X_Add/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 18th August 2014 , last changed 24th May 2016

  
[Addressbook.group.subgroups](Addressbookgroupsubgroups.md) - [Addressbook.hasUnsavedChanges](AddressbookhasUnsavedChanges.md)

[HTML Version](Addressbookgroups.shtml)