string.range action

This trigger action will take a string, and break it apart based on the range definitions defined in the fields parameter.

Action

This trigger action is found under the String heading.

Canvas

When dragged onto the canvas, the appearance of the action is a rectangle with two routing points.

The left routing point (red) is the failure route. This route will be taken if there is an error during execution.

The right routing point (green) is the success route. This route will be taken if action executes successfully.

Form

Add string.range

Parameters

Name

Type

Required

Descriptions

Input

String

Yes

A string that needs to be split.

Fields

Key/value pairs

Yes

Each field represents one sub-string to extract from the input string. The key will be used to access the results from the action. For example, The key, value pairs are specified as follows:

  • key - "field1" value - "4" - extract a string from offset 4 to the end of the string

  • key - "field2" value - "4,-" - extract a string from offset 4 to the end of the string

  • key - "field3" value - "4,6" - extract a string from offset 4 to offset 6 (ie 2 bytes long)

  • key - "field4" value - "4,~2" - extract a string from offset 4 with a length of 2 (which is same as "4,6")

  • key - "field5" value - "4,^2" - extract a string from offset 4 until 2 from the end of the string.

Action variables

Name

Type

Description

$(action.X.value)

Array

The resulting object. For example: "field1, field2" (using the example data provided in the parameters, above).

If you want to access one particular element from the resultant object, then you need to specify it.