Addressbook.searchPeopleWithName
--------------------------------

Searches people matching the first and/or last name.

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

### Deprecated

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

MBS( "Addressbook.searchPeopleWithName" { ; FirstName; LastName } ) 

**MBS**( **"Addressbook.searchPeopleWithName";** /\* Searches people matching the first and/or last name. \*/  
**$FirstName**; /\* Optional; The first name or search for.   
Can be empty to search only for last name.e.g. "Christian" \*/   
**$LastName**) /\* Optional; The last name or search for.   
Can be empty to search only for first name.e.g. "Schmitz" \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| FirstName | The first name or search for.    Can be empty to search only for last name. | "Christian" | Optional |
| LastName | The last name or search for.    Can be empty to search only for first name. | "Schmitz" | Optional |

### Result

Returns list of all person IDs.

### Description

Searches people matching the first and/or last name.  
This search is case insensitive.  
### Examples

Search for Peter Miller:

 MBS ( "Addressbook.searchPeopleWithName"; "Peter"; "Miller" )  
Search for Peter only:

 MBS ( "Addressbook.searchPeopleWithName"; "Peter"; "" )  
### See also

- [Addressbook.multivalue.replaceValueAtIndex](AddressbookmultivaluereplaceValueAtIndex.md)
- [Addressbook.record.valueForProperty](AddressbookrecordvalueForProperty.md)
- [Addressbook.searchGroupsWithName](AddressbooksearchGroupsWithName.md)
- [Addressbook.searchPeopleWithEmail](AddressbooksearchPeopleWithEmail.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 is free to use.

Created 18th August 2014 , last changed 14th July 2022

  
[Addressbook.searchPeopleWithModificationDate](AddressbooksearchPeopleWithModificationDate.md) - [Addressbook.searchPersonWithExternalUID](AddressbooksearchPersonWithExternalUID.md)

[HTML Version](AddressbooksearchPeopleWithName.shtml)