Get Element Position In List Step
The Get Element Position In List step finds an element's spot (its index) within a list variable. You can use it to find specific text or numbers in your lists.
How to Use Get Element Position In List
This step helps you find where a certain item is in a list.
Step 1: Add the Step to Your Process
- Drag and drop the Get Element Position In List step into your process.
- (Optional) Give the step a Step Name so you can tell what it does.
Step 2: Set Up Input Parameters
- List variable to check (Required)
- Pick an existing list variable. This is the list you want to look through.
- Element to check for (Required)
- Type in the value or pick a variable that holds the value you want to find in the list.
- The type of data (text or number) must match the type of the list you picked.
Important:
- The "Element to check for" field only becomes available after you pick a "List variable to check".
- If you need to change the list's data type, first clear the variable you have. Changing the data type will erase everything currently in the list.
Step 3: Set Up Output Parameters
- Destination list (Required)
- Pick an existing
ListOfIntegersvariable or make a new one. This variable will hold all the index positions where the element was found.
- Pick an existing
- Element count (Required)
- Pick an existing integer variable or make a new one. This variable will hold the total number of times the element showed up in the list.
Parameters Explained
Step Name (Optional)
- A custom name for this step in your process. This helps you know what the step does in your workflow.
List variable to check (Required)
- The list variable where you want to look for an element.
Element to check for (Required)
- The specific value (text or number) you want to find in the list.
Destination list (Required)
- A
ListOfIntegersvariable that holds the index (position) of every time the element appears.
Element count (Required)
- An integer variable that holds how many times the element was in the list.
Related Articles
- Add New Element To List Step
- Clear List Step - Robotiq.ai Help Center
- Read String From List Step
- Read Integer from List Step
Need Help?
Can't find what you're looking for? Join the Robotiq Community to get help from other users and the Robotiq team.