List.And
--------

Returns a list with values which are contained in both lists.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [List](component_List.md) | [4.4](newinversion44.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "List.And"; List1; List2 { ; NoReturnEnding } ) 

**MBS**( **"List.And";** /\* Returns a list with values which are contained in both lists. \*/  
**$List1**; /\* The first list.e.g. "Hello" ¶ "World" \*/   
**$List2**; /\* The second list.e.g. "Hello" ¶ "Friends" \*/   
**$NoReturnEnding**) /\* Optional; Pass 1 to have no extra newline character on the end of the returned list. Default is 0 to include one to easily concat lists.e.g. 1 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| List1 | The first list. | "Hello" ¶ "World" |  |
| List2 | The second list. | "Hello" ¶ "Friends" |  |
| NoReturnEnding | Pass 1 to have no extra newline character on the end of the returned list. Default is 0 to include one to easily concat lists. | 1 | Optional |

### Result

Returns list or error.

### Description

Returns a list with values which are contained in both lists.  
Performs a logical AND operation.  
  
This function is made for lists without duplicate values as it checks if values from one list exists in others, which may not work correctly if one list has duplicate values.  
### Examples

Perform logical AND on list:

 MBS ( "List.AND"; "1¶2¶3¶4"; "3¶4¶5¶6" )  
### See also

- [List.AndColumn](ListAndColumn.md)
- [List.Find](ListFind.md)
- [List.FindEquals](ListFindEquals.md)
- [List.Intersection](ListIntersection.md)
- [QuickList.And](QuickListAnd.md)
- [QuickList.AndColumn](QuickListAndColumn.md)

### Release notes

- **Version 10.0**
    - Added [List.AndColumn](https://www.mbsplugins.eu/ListAndColumn.shtml), [List.NotColumn](https://www.mbsplugins.eu/ListNotColumn.shtml), [List.OrColumn](https://www.mbsplugins.eu/ListOrColumn.shtml), and [List.XOrColumn](https://www.mbsplugins.eu/ListXOrColumn.shtml) functions.
    - Added [QuickList.AndColumn](https://www.mbsplugins.eu/QuickListAndColumn.shtml), [QuickList.NotColumn](https://www.mbsplugins.eu/QuickListNotColumn.shtml), [QuickList.OrColumn](https://www.mbsplugins.eu/QuickListOrColumn.shtml), and [QuickList.XOrColumn](https://www.mbsplugins.eu/QuickListXOrColumn.shtml) functions.

### Blog Entries

- [New in MBS FileMaker Plugin in Version 14.5](https://www.mbsplugins.de/archive/2025-01-08/New_in_MBS_FileMaker_Plugin_in/monkeybreadsoftware_blog_filemaker)
- [Combined Components with MBS FileMaker Plugin](https://www.mbsplugins.de/archive/2021-03-29/Combined_Components_with_MBS_F/monkeybreadsoftware_blog_filemaker)
- [MBS Filemaker Plugin, version 4.4pr3](https://www.mbsplugins.de/archive/2014-10-01/MBS_Filemaker_Plugin_version_4/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 2/2020, Seite 35](https://filemaker-magazin.de/neuigkeit/4089-Appetithappen-FMM_202002)

This function checks for a license.

Created 25th September 2014 , last changed 20th December 2023

  
[List.AddValue](ListAddValue.md) - [List.AndColumn](ListAndColumn.md)

[HTML Version](ListAnd.shtml)