Skip to main content
Roberty Studio
RPAFunctions

Get item from a list

Get item from a list

Gets a specific item of a data list based on the index provided. Essential for accessing individual elements of lists returned by other actions — such as a database result row, an item of a text split or an element of a manually created list.


Options​

Enter the index of the list​

Enter the position of the item you want to get. Counting starts at zero — that is, the first item of the list is at position 0, the second at position 1, and so on.

List​

Select an output field of the list type from a previous action. Only fields that return lists are shown as an option.

Returns​

Javascript code​

js
actions["action-id"].value // value of the item found at the position indicated (Any)
actions["action-id"].index // index of the item accessed (Number)

Field selection​

  • value — value of the list item at the position provided (Any)
  • index — index that was used to access the item (Number)

Rules and Conditions​

  • The List and Index fields are required.
  • The index starts at zero — the first item is at position 0.
  • If the index provided is greater than the size of the list, the action may return empty.
  • Only output fields of the list or any type are listed as options for the List field.