List.RemoveDuplicateItems
-------------------------

Removes duplicate 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.RemoveDuplicateItems"; List { ; NoReturnEnding; RemoveAll; CaseInsensitive } ) 

**MBS**( **"List.RemoveDuplicateItems";** /\* Removes duplicate items in the list. \*/  
**$List**; /\* The list to process.e.g. "Hello" ¶ "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 \*/   
**$RemoveAll**; /\* Optional; If duplicate is found also remove the first occurrence. Set to 1 to enable or 0 to disable. Default is disabled.e.g. 1 \*/   
**$CaseInsensitive**) /\* Optional; Whether to perform comparison case insensitve.  
By default we do case sensitive operations, which are faster.  
Pass 1 for insensitve or 0 for sensitive.e.g. 0 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| List | The list to process. | "Hello" ¶ "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 |
| RemoveAll | If duplicate is found also remove the first occurrence. Set to 1 to enable or 0 to disable. Default is disabled. | 1 | Optional |
| CaseInsensitive | Whether to perform comparison case insensitve.   By default we do case sensitive operations, which are faster.   Pass 1 for insensitve or 0 for sensitive. | 0 | Optional      Added in version **14.0**. |

### Result

Returns new list.

### Description

Removes duplicate items in the list.  
Similar to UniqueValues function in FileMaker to find unique values.  
See also [QuickList.RemoveDuplicateItems](QuickListRemoveDuplicateItems.md) function.  
### Examples

Remove duplicates:

 MBS ( "List.RemoveDuplicateItems"; "Hello¶World¶Hello" )  
Remove all duplicates

 MBS ( "List.RemoveDuplicateItems"; "Hello¶World¶Hello"; 0; 1 )  
### See also

- [List.FindDuplicateItems](ListFindDuplicateItems.md)
- [List.HasDuplicateItems](ListHasDuplicateItems.md)
- [List.Remove](ListRemove.md)
- [QuickList.FindDuplicateItems](QuickListFindDuplicateItems.md)
- [QuickList.Remove](QuickListRemove.md)
- [QuickList.RemoveDuplicateItems](QuickListRemoveDuplicateItems.md)

### Release notes

- **Version 14.0**
    - Added CaseSensitive flag for [List.FindDuplicateItems](https://www.mbsplugins.eu/ListFindDuplicateItems.shtml), [List.HasDuplicateItems](https://www.mbsplugins.eu/ListHasDuplicateItems.shtml), [List.RemoveDuplicateItems](https://www.mbsplugins.eu/ListRemoveDuplicateItems.shtml), [QuickList.FindDuplicateItems](https://www.mbsplugins.eu/QuickListFindDuplicateItems.shtml), [QuickList.HasDuplicateItems](https://www.mbsplugins.eu/QuickListHasDuplicateItems.shtml), [QuickList.RemoveDuplicateItems](https://www.mbsplugins.eu/QuickListRemoveDuplicateItems.shtml).
- **Version 10.4**
    - Added RemoveAll and ReturnNewList parameters to [QuickList.RemoveDuplicateItems](https://www.mbsplugins.eu/QuickListRemoveDuplicateItems.shtml) function.

### Example Databases

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

### Blog Entries

- [MBS FileMaker Plugin, version 13.6pr3](https://www.mbsplugins.de/archive/2023-12-13/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 5.3pr3](https://www.mbsplugins.de/archive/2015-09-15/MBS_FileMaker_Plugin_version_5/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 18th August 2014 , last changed 10th December 2023

  
[List.Remove](ListRemove.md) - [List.RemoveEmptyItems](ListRemoveEmptyItems.md)

[HTML Version](ListRemoveDuplicateItems.shtml)