Ask AI
Skip to main content

Get an item from a data list.

Function: Get an item from a data list.

This action allows you to retrieve a single item from a collection of data, such as a list of products, tasks, or customer records. You specify which list to use and the position (index) of the item you want to get. The retrieved item will then be stored in a variable for further use in your application.

Input

  • List: A collection or array of data items from which you want to extract one specific item.
  • Index: A whole number representing the position of the item you want to retrieve from the list. The first item in a list is typically at position 0, the second at 1, and so on.

Output

  • Result: The specific data item retrieved from the list. This item will be stored in a variable. By default, this variable will be named "RESULT", but you can choose a different name to make it more descriptive (e.g., "SelectedProduct", "CurrentTask"). The type of data stored will match the type of items in your list.

Execution Flow

Real-Life Examples

Example 1: Get a specific product from a shopping cart

Imagine you have a list of items in a customer's shopping cart, and you want to inspect the second item they added.

  • Inputs:
    • List: ["Laptop", "Mouse", "Keyboard", "Monitor"]
    • Index: 1 (to get the second item, as lists start counting from 0)
  • Result: The action retrieves "Mouse" and stores it in a variable named "RESULT" (or a custom name like "SelectedProduct").

Example 2: Accessing a task from a daily to-do list

You have a list of tasks for the day, and you need to mark the first task as "In Progress".

  • Inputs:
    • List: ["Send emails", "Call client", "Prepare report", "Team meeting"]
    • Index: 0 (to get the first task)
  • Result: The action retrieves "Send emails" and stores it in a variable named "CurrentTask".

Example 3: Retrieving a customer record from search results

After searching for customers, you get a list of matching records. You want to view the details of the third customer in that list.

  • Inputs:
    • List: [\{"Name": "Alice", "ID": "C001"\}, \{"Name": "Bob", "ID": "C002"\}, \{"Name": "Charlie", "ID": "C003"\}, \{"Name": "David", "ID": "C004"\}] (This is a list of customer objects)
    • Index: 2 (to get the third customer)
  • Result: The action retrieves \{"Name": "Charlie", "ID": "C003"\} and stores it in a variable named "CustomerDetails".