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).

Last updated