Read Integer from List Step

The Read Integer from List Step gets an integer from a certain spot in a list of integers. You use it to pull one number from a list and save it in a new or existing variable.

How to Use Read Integer from List

Use this step to get an integer from a list by its index.

Step 1: Add the Step to Your Process

  1. Drag and drop the Read Integer from List step into your process.
  2. (Optional) In the Step name field, give the step a custom name. This helps you find it in your process.

Step 2: Set Up Input Parameters

  1. List of integers (Required)
    • Type the name of a variable that already holds your list of integers.
    • Example: myIntegerList
  2. Iterator index (Required)
    • Type the name of an existing integer variable. This variable needs to contain the index (position) of the integer you want to read from the list.
    • Example: currentIndex (If currentIndex is 0, it reads the first item.)

Step 3: Set Up Output Parameter

  1. Integer value destination variable (Required)
    • Type a name for a new or existing integer variable. The integer read from the list will be saved here.
    • Example: extractedInteger

Parameters Explained

Step name (Optional)

  • A custom name for this step in your workflow.
  • Example: Get ID from List
  • Use it to make your process easier to understand.

List of integers (Required)

  • The variable that holds the list of integer values you want to read from.
  • Example: myNumbers (where myNumbers is [10, 20, 30])
  • You must set up this variable before you use it in this step.

Iterator index (Required)

  • The variable that holds the zero-based index of the integer you want to get.
  • Example: loopIndex (If loopIndex is 1, it gets the second item in the list.)
  • People often use this with a loop to go through each item in a list.

Integer value destination variable (Required)

  • The variable where the integer you pull out will be stored.
  • Example: currentNumber
  • You can use this variable in the steps that come after.

Related Articles

Need Help?

Can't find what you're looking for? Join the Robotiq Community to get help from other users and the Robotiq team.

Was this article helpful?