# remove-duplicate-list-values

## Description

<mark style="color:purple;">`remove-duplicate-list-values`</mark> *adaptor removes duplicate values in a list.*

The adaptor removes duplicated list values and provides a list containing only the unique values. The case-sensitive option can be used to treat uppercase and lowercase letters as different or equivalent. The duplicates output will show all removed duplicate values, not a unique list of removed values.

## Inputs

**`list`**\
Type: `list`\
Required: Yes\
The list containing duplicate values to be removed.

**`case sensitive`**\
Type: `boolean`\
Required: No\
When set to `True`, lowercase and uppercase letters are treated as different. When set to `False`, lowercase and uppercase letters are treated as equivalent. If unspecified, defaults to `False`

## Outputs

**`list`**\
Type: `list`\
A list containing unique values.

**`duplicates`**\
Type: `list`\
A list containing duplicate values.

## Examples

### Example 1: Default behaviour.

#### Inputs:

`list:`

1. Bovine
2. Mouse
3. Gibbon
4. Orangutan
5. bovine
6. mouse
7. Bovine

`case sensitive:` *null (empty)*

#### Outputs:

`list`:

1. Bovine
2. Mouse
3. Gibbon
4. Orangutan

`duplicates:`

1. bovine
2. mouse
3. Bovine

-> Removed duplicate values from the list. Note that the first instance of a value is the one retained - in this instance Bovine instead of bovine.

### Example 2: Remove duplicate values with case sensitive set to true.

#### Inputs:

`list:`

1. Bovine
2. Mouse
3. Gibbon
4. Orangutan
5. bovine
6. mouse
7. Bovine

`case sensitive:` True

#### Outputs:

`list`:

1. Bovine
2. Mouse
3. Gibbon
4. Orangutan
5. bovine
6. mouse

`duplicates:`

1. Bovine

-> Removed case sensitive duplicate values from the list.

## Use case

* Use after [<mark style="color:purple;">`create-list-from-datatable`</mark>](/data-flo/reference-guide/create-list-from-datatable.md) adaptor to identify duplicate values from a datatable column.
* Use to create the input for an adaptor requiring a list of options.
* If a unique list of the removed values is needed, a second <mark style="color:purple;">`remove-duplicate-list-values`</mark> adaptor could be connected to the duplicates output.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cgps.gitbook.io/data-flo/reference-guide/remove-duplicate-list-values.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
