SLICE

Returns 1 or length characters from a piece of text, beginning at the start_index.

Syntax 

SLICE(text, start_index, [length])

Examples 

Example 1

Input

{
  "my_action": {
    "message": "hello world"
  }
}

Formula

SLICE(my_action.message, 6)

Output

"w"
Example 2

Input

{
  "my_action": {
    "message": "hello world"
  }
}

Formula

SLICE(my_action.message, 6, 5)

Output

"world"
Example 3

If `length` extends past the end of the piece of text, it returns only the remainder of the text:

Input

{
  "my_action": {
    "message": "hello world"
  }
}

Formula

SLICE(my_action.message, 6, 50)

Output

"world"
Example 4

`start_index` can be specified as a negative number to count back from the end of the piece of text:

Input

{
  "my_action": {
    "message": "hello world"
  }
}

Formula

SLICE(my_action.message, -5, 5)

Output

"world"