PROCESIO
OverviewPlatform ActionsIntegrations & DemosMarketplaceCustom ActionsDeveloperโ€™s Guide

Get Index

Returns the position of the first occurrence of a text inside another text, counting from 0, or -1 if it is not found.

Get Index tells you where a value first appears inside a text. The position counts from 0 (the first character is at position 0). If the value is not found, you get -1. Combine it with Take From Left, Take From Middle or Substring to cut a text at a marker.

Add the action

In the Process Designer toolbox, open String and pick Get Index (or type Get Index in the search box). The List folder has an action with the same name that works on lists; make sure you pick the one in String.

The Get Index action properties: Input String, Input Value to look for and Result

Inputs and outputs

FieldDirectionTypeRequiredWhat to put / what you get
Input StringInputTextYesThe text to search in.
Input Value to look forInputTextYesThe character or text to find.
ResultOutputIntegerYesThe position of the first occurrence, counting from 0, or -1 if it is not found.

Example

Input StringInput Value to look forResult
Hello worldo4
Hello worldworld6
Hello worldW-1
Hello worldz-1
ศ˜tefan ศ˜S-1
Hello(empty)0

Good to know

  • Positions start at 0.
  • The search is case-sensitive, and a letter with a diacritic is a different letter (S does not find ศ˜).
  • Only the first occurrence is reported.
  • An empty value to look for returns 0.

On this page