List.MatchesSubString
---------------------

Finds list entries which contains a given text.

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

MBS( "List.MatchesSubString"; List; Text { ; Flags; NoReturnEnding } ) 

**MBS**( **"List.MatchesSubString";** /\* Finds list entries which contains a given text. \*/  
**$List**; /\* The list to process.e.g. "Hello" ¶ "" ¶ "World" \*/   
**$Text**; /\* The text to find.e.g. "Hello" \*/   
**$Flags**; /\* Optional; Add 4 to reverse operation (NOT).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 |
|---|---|---|---|
| List | The list to process. | "Hello" ¶ "" ¶ "World" |  |
| Text | The text to find. | "Hello" |  |
| Flags | Add 4 to reverse operation (NOT). | 0 | Optional |
| 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      Added in version **16.3**. |

### Result

Returns list or error.

### Description

Finds list entries which contains a given text.  
Comparison is case insensitive.  
  
See also [List.MatchesPostfix](ListMatchesPostfix.md) and [List.MatchesPrefix](ListMatchesPrefix.md) functions.  
### Examples

Try the function:

 Set Variable \[ $r ; Value: "1234¶5678¶12¶34¶5432¶0123¶3" \]   
Set Variable \[ $n ; Value: MBS ( "List.MatchesSubString"; $r ; "12" ) \]   
Show Custom Dialog \[ "Result" ; $n \]   
\# shows 1234 12 0123   
Set Variable \[ $d ; Value: MBS ( "List.MatchesSubString"; $r ; "12"; 4 ) \]   
Show Custom Dialog \[ "Result" ; $d \]   
\# shows 5678 34 5432   
Get list of all fields from other tables in the current layout:

 MBS ( "List.MatchesSubString"; FieldNames ( Get(FileName) ; Get(LayoutName )); "::")  
<small>  
Example result:   
Test::SomeField  
Test::OtherField</small>### See also

- [List.ColumnMatchesSubString](ListColumnMatchesSubString.md)
- [List.MatchesPostfix](ListMatchesPostfix.md)
- [List.MatchesPrefix](ListMatchesPrefix.md)
- [QuickList.MatchesSubString](QuickListMatchesSubString.md)

### Release notes

- **Version 12.4**
    - Added [List.MatchesSubString](https://www.mbsplugins.eu/ListMatchesSubString.shtml) function.
- **Version 11.0**
    - Changed [QuickList.MatchesSubString](https://www.mbsplugins.eu/QuickListMatchesSubString.shtml) to use caseless comparison on Windows and Linux and not just on macOS/iOS.

### Example Databases

- [Python](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Python.shtml#1ScriptAnchor_)

### Blog Entries

- [MBS FileMaker Plugin 12.4](https://www.mbsplugins.de/archive/2022-09-27/MBS_FileMaker_Plugin_124/monkeybreadsoftware_blog_filemaker)
- [Neues MBS Plugin 12.4 für Claris FileMaker](https://www.mbsplugins.de/archive/2022-09-06/Neues_MBS_Plugin_124_für_Clar/monkeybreadsoftware_blog_filemaker)
- [MBS Plugin 12.4 for Claris FileMaker](https://www.mbsplugins.de/archive/2022-09-06/MBS_Plugin_124_for_Claris_File/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 12.4pr1](https://www.mbsplugins.de/archive/2022-08-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 21st July 2022 , last changed 21st June 2026

  
[List.MatchesPrefix](ListMatchesPrefix.md) - [List.Not](ListNot.md)

[HTML Version](ListMatchesSubString.shtml)