Index Of Text Step

Index Of Text Step - Robotiq.ai

The Index Of Text Step finds where specific characters start within a text string. You use it to locate a particular piece of text inside a larger text.

How to Use Index Of Text Step

This step helps you find the exact position of characters within a text variable.

Add the Index Of Text Step

  1. Drag and drop the Index Of Text Step into your process flow.
  2. (Optional) In the Step name field, type a custom name for the step. This helps you tell it apart in your process.

Configure Input Parameters

Source text variable (Required)

  • This is the text you want to search inside.
  • Pick an existing variable that holds text.
  • Example: A variable called full_sentence that says "The quick brown fox."

Text to contain (Required)

  • This is the specific text you are looking for.
  • Pick an existing variable or make a new one that holds text.
  • Example: A variable called search_word that says "quick".

Configure Output Parameters

Index (Required)

  • This variable holds the starting position of the Text to contain within the Source text variable.
  • Pick an existing variable or make a new one that holds whole numbers.
  • If the Text to contain is found, the Index variable will show where it starts (counting from 0). If it's not found, it will show -1.
  • Example: If full_sentence is "The quick brown fox." and search_word is "quick", the Index will be 4.

Important: If the Text to contain shows up more than once in the Source text variable, this step only finds the first one. To find all of them, you need to use this step inside a loop, like a While Loop.

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?