Description

Retrieves a substring from the input.



Attributes

Input

  • Input - The original string.

  • Length - The number of characters in the substring.

  • Position - The zero-based starting character position of a substring in this instance.

Common

  • ContinueOnError - The Boolean value to specify whether to continue executing the next activities even if there is an error thrown on this activity.

Misc

  • DisplayName - Renames the activity.

  • Result - A string that is equivalent to the substring of Length that begins at the position in this instance.


Example

  1. Create a String variable and name it substring.
  2. Add a Substring activity inside the initial Sequence.
  3. In the Substring Result field, add the substring variable.
  4. In the Substring Input field, write "Robotic Process Automation".
  5. In the Substring Position field, write 16.
  6. In the Substring Length field, write 10. This would retrieve the word "Automation".
  7. Under the Substring activity, add a Write Line activity.
  8. In the Write Line Text field, add the substring variable. 

    The use case should look as the following screenshot:



This should be the output in the Output panel: