> For the complete documentation index, see [llms.txt](https://docs.avonnicomponents.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.avonnicomponents.com/flow/actions/data-conversion-and-formatting/get-value-from-string-collection.md).

# Get Value from String Collection

## Overview

This action lets you quickly retrieve a specific value from a collection of text strings. You can get the first, last, or value at a particular position within the collection.

***

## How it Helps

Imagine you have a collection of product codes and need to access the third code in the list quickly. This action allows you to do that without writing loops or complex logic.

***

## When to Use It

This action is ideal for:

* **Accessing specific values in a string collection.**
* **Retrieving the first, last, or any value by its position in the collection.**
* **Simplifying value retrieval without manual searching or complex formulas.**
* **Working with ordered collections where the position of values is significant.**

***

## Example

To get the second item in a list of selected options:

1. **Create a String Collection:** Have a String Collection variable storing a list of options chosen from a multi-select picklist.
2. **Configure the Action:** Select the String Collection variable and choose "At Index" as the operation, specifying "1" as the index to retrieve the second item (remember, indexes start at 0).
3. **Use the Value:** You can use the action's output to, for example, display the selected option in a text field.

***

## Key Considerations

* **Source Collection:** Ensure you have a valid collection of strings.
* **Operation:** Choose the appropriate operation:
  * **First:** Retrieves the first value in the collection.
  * **Last:** Retrieves the last value in the collection.
  * **At Index:** Retrieves the value at a specific numerical index (starting from 0).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.avonnicomponents.com/flow/actions/data-conversion-and-formatting/get-value-from-string-collection.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
