Addressbook.searchElementForConjunction
---------------------------------------

Joins several search elements.

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

### Deprecated

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

MBS( "Addressbook.searchElementForConjunction"; conjunction; SearchElements ) 

**MBS**( **"Addressbook.searchElementForConjunction";** /\* Joins several search elements. \*/  
**$conjunction**; /\* The logical operator with which to combine the search elements. Can be "AND" or "OR".e.g. "AND" \*/   
**$SearchElements**) /\* List of search element IDs. \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| conjunction | The logical operator with which to combine the search elements. Can be "AND" or "OR". | "AND" |
| SearchElements | List of search element IDs. |  |

### Result

Returns ID or error.

### Description

Joins several search elements.  
Returns a compound search element, created by combining the search elements in an array with the given conjunction.  
### Examples

Find people with last name and email matching:

 Set Variable \[$e1 ; Value:MBS ( "[Addressbook.searchElementForProperty](AddressbooksearchElementForProperty.md)"; "person"; "LastNameProperty"; ""; ""; "Schmitz"; "ContainsSubStringCaseInsensitive" )\]  
Set Variable \[$e2 ; Value:MBS ( "[Addressbook.searchElementForProperty](AddressbooksearchElementForProperty.md)"; "person"; "EmailProperty"; ""; ""; "monkeybread"; "ContainsSubStringCaseInsensitive" )\]  
Set Variable \[$e ; Value:MBS ( "Addressbook.searchElementForConjunction"; "and"; $e1 &amp; ¶ &amp; $e2 )\]  
Set Variable \[$records ; Value:MBS ( "[Addressbook.recordsMatchingSearchElement](AddressbookrecordsMatchingSearchElement.md)"; $e )\]  
Set Variable \[$record ; Value:GetValue($records ; 1)\]  
Set Variable \[$name ; Value:MBS ( "[Addressbook.record.displayname](Addressbookrecorddisplayname.md)"; $record )\]  
Show Custom Dialog \[$name \]  
### See also

- [Addressbook.record.displayname](Addressbookrecorddisplayname.md)
- [Addressbook.recordsMatchingSearchElement](AddressbookrecordsMatchingSearchElement.md)
- [Addressbook.searchElementForProperty](AddressbooksearchElementForProperty.md)

### Blog Entries

- [MBS FileMaker Plugin, version 5.4pr4](https://www.mbsplugins.de/archive/2015-10-29/MBS_FileMaker_Plugin_version_5/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 26th October 2015 , last changed 26th October 2015

  
[Addressbook.save](Addressbooksave.md) - [Addressbook.searchElementForProperty](AddressbooksearchElementForProperty.md)

[HTML Version](AddressbooksearchElementForConjunction.shtml)