# select-list-values

## Description

<mark style="color:purple;">`select-list-values`</mark> *adaptor selects values, based on position, from a list.*

## Inputs

**`list`**\
Type: `list`\
Required: Yes\
The list containing the values to be selected.

**`begin`**\
Type: `number`\
Required: No\
The position of the first value to be selected. A negative number can be used to count from the end of the list (e.g. `-5` would start at the fifth-to-last value). If unspecified, defaults to `1` (first value in list).

**`end`**\
Type: `number`\
Required: No\
The position of the last value to be selected. A negative number can be used to count from the end of the list. If unspecified, defaults to `-1` (last value in list).

**`limit`**\
Type: `number`\
Required: No\
A positive number specifying a limit on the number of values to be selected. If unspecified, no limit will be applied.

## Outputs

**`list`**\
Type: `list`\
A list containing the selected values.

## Examples

### Example 1: Default behaviour.

#### Inputs:

`list`:

1. January
2. February
3. March
4. April
5. May

`begin:` 1

`end:` 3

`limit:` *null (empty)*

#### Outputs:

`list`:

1. January
2. February
3. March

-> Selected values `1` to `3` from the list.

### Example 1: Select values from the list with a specific limit.

#### Inputs:

`list`:

1. January
2. February
3. March
4. April
5. May

`begin:` *null (empty)*

`end:` *null (empty)*

`limit:` 4

#### Outputs:

`list`:

1. January
2. February
3. March
4. April

-> Selected values `1` to `4` from the list as the limit was set to `4`.

## Use Cases

* Use in combination with the [sort-list](/data-flo/reference-guide/sort-list.md) adaptor to divide up an alphabetically sorted list.


---

# 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/select-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.
