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
- Drag and drop the Read Integer from List step into your process.
- (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
- List of integers (Required)
- Type the name of a variable that already holds your list of integers.
- Example:
myIntegerList
- 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(IfcurrentIndexis0, it reads the first item.)
Step 3: Set Up Output Parameter
- 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(wheremyNumbersis[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(IfloopIndexis1, 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
- Read String From List Step - Learn how to read string values from a list.
- Define Variable Step - Learn how to create new variables.
- Set Variable Value Step - Learn how to put values into variables.
- Assign Iterator In Loop To Variable Step - See how to handle loop iterators.
Need Help?
Can't find what you're looking for? Join the Robotiq Community to get help from other users and the Robotiq team.