List.RemoveEmptyItems
---------------------

Removes empty items in the list.

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

MBS( "List.RemoveEmptyItems"; List { ; NoReturnEnding } ) 

**MBS**( **"List.RemoveEmptyItems";** /\* Removes empty items in the list. \*/  
**$List**; /\* The list to process.e.g. "Hello" ¶ "" ¶ "World" \*/   
**$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" |  |
| 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 new list.

### Description

Removes empty items in the list.  
### Examples

Remove empty lines:

 MBS ( "List.RemoveEmptyItems"; "Hello" &amp; ¶ &amp; "" &amp; ¶ &amp; "World" )  
<small>  
Example result:   
Hello  
World</small>### See also

- [List.Remove](ListRemove.md)
- [QuickList.RemoveEmptyItems](QuickListRemoveEmptyItems.md)

### Example Databases

- [Text functions/Lists](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Text%20functions/Lists.shtml#1ScriptAnchor_)

This function checks for a license.

Created 18th August 2014 , last changed 6th July 2023

  
[List.RemoveDuplicateItems](ListRemoveDuplicateItems.md) - [List.RemovePostfix](ListRemovePostfix.md)

[HTML Version](ListRemoveEmptyItems.shtml)