Get Sub String

The Get Sub String action extracts a specific portion of a string based on a given index or range.

Syntax:

Input Value: <string>;<index OR range>

Output Value: <Dynamic Variable>;<Dynamic Variable>(Optional)

Argument
Description

<string>

Provide the input string from which the substring will be extracted.

<index OR range>

Provide the position(s) used to determine which part of the string to extract.

<Dynamic Variable>

Stores the extracted substring.

<Dynamic Variable> (Optional)

Stores the operation status: True if successful, False if input is invalid.

Output: Upon the usage of this action, here are the possible returns and their reason.

Return
Reason

Output

Displays the extracted substring.

None/Blank

If the Input Value is missing or format is invalid.

True

If substring extracted successfully.

False

If the input value is empty or an invalid index/range (out of bounds) is provided

Examples:

Scenario 1: Extracting substring using Index

  • Input Value: "Software Engineer;4"

  • Output Value: {SubStr} = "ware Engineer"

Scenario 2: Extracting substring using Range

  • Input Value: "Software Engineer;9-17"

  • Output Value: {SubStr} = "Engineer"

Scenario 3: Invalid index provided

  • Input Value: "Software;20"

  • Output Value: {SubStr} = None

Scenario 4: Empty string input

  • Input Value: "";3

  • Output Value: {SubStr} = ""

Last updated

Was this helpful?