List.AndColumn
--------------

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

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

MBS( "List.AndColumn"; List1; List2; Separator; Column { ; NoReturnEnding } ) 

**MBS**( **"List.AndColumn";** /\* 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" \*/   
**$Separator**; /\* The separator text.  
Can be multiple characters.  
For tab separated text, pass Char(9). For CSV separated text, pass ";" or ",".e.g. Char(9) \*/   
**$Column**; /\* The index of the column to compare.  
Starts with 0 for first column.e.g. 0 \*/   
**$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" |  |
| Separator | The separator text.   Can be multiple characters.   For tab separated text, pass Char(9). For CSV separated text, pass ";" or ",". | Char(9) |  |
| Column | The index of the column to compare.   Starts with 0 for first column. | 0 |  |
| 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.  
  
Returns a list with values from list2 where the columns compared are contained in both lists.  
Checks the given column in both lists too compare.  
If Separator is empty, this is same as [List.And](ListAnd.md), but slower.  
### Examples

AND two lists based on 2 column:

 MBS ( "List.AndColumn";   
"1 test 3¶a b c¶d¶e f";   
"2 test 4¶a f c¶d b";   
" "; 1 )  
<small>  
Example result:   
2 test 4  
a f c  
d b</small>### See also

- [List.And](ListAnd.md)
- [List.GetColumn](ListGetColumn.md)
- [List.NotColumn](ListNotColumn.md)
- [List.OrColumn](ListOrColumn.md)
- [List.XOrColumn](ListXOrColumn.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 the MBS FileMaker Plugin 10.0](https://www.mbsplugins.de/archive/2020-01-23/New_in_the_MBS_FileMaker_Plugi/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 10.0pr5](https://www.mbsplugins.de/archive/2020-01-02/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 23th December 2019 , last changed 1st February 2021

  
[List.And](ListAnd.md) - [List.BestMatch](ListBestMatch.md)

[HTML Version](ListAndColumn.shtml)