PROCESIO
OverviewPlatform ActionsIntegrations & DemosMarketplaceCustom ActionsDeveloperโ€™s Guide

Take From Middle

Returns a piece of a text that starts at a given position and has the length you choose.

Take From Middle returns a piece of a text: you say where it starts and how many characters it has. Positions count from 0. Use it to read a fixed-position field, such as characters 6 to 10 of a code.

Take From Middle was previously called String Mid.

Add the action

In the Process Designer toolbox, open String and pick Take From Middle (or type Take From Middle in the search box).

The Take From Middle action properties: Input String, Index starting at, Extract length and Result

Inputs and outputs

FieldDirectionTypeRequiredWhat to put / what you get
Input StringInputTextYesThe text to take the piece from.
Index starting atInputIntegerYesWhere the piece starts. The first character is at position 0.
Extract lengthInputIntegerYesHow many characters to take.
ResultOutputTextYesThe piece of text.

Example

Input StringIndex starting atExtract lengthResult
Hello world65world
Hello world04Hell
Hello world650world
(empty text)12(empty text)
Hello102the step fails
Hello-12the step fails

Good to know

  • Positions start at 0.
  • A length that runs past the end is safe: you get the text up to the end.
  • The start position must be inside the text. A start past the end fails the step with "startIndex cannot be larger than length of string.", and a negative start fails with "startIndex ('-1') must be a non-negative value."
  • An empty input gives an empty result, whatever the positions.

On this page