Get Sub String

The Get Sub String Action in the Avo Assure is found under the @Generic Element. This action in Avo Assure tells the client to extract a specific portion of a string based on a specified index or range, then it saves the result in an output variable.

Syntax

Input: <string>;< index OR range>

Argument
Description

string

It refers to a sequence of characters (letters, numbers, symbols) treated as text.

index OR range

The position from where user must get the string of actual output.

Output: <Dynamic Variable>

Note: Input index should start from “0” till “n”

Usecase/Example

To fetch the input for Index value:

To fetch the input for Range value:

Scenario: Validating Username Format with Get Sub String

As in the above example have a system that generates usernames with a prefix and a number (e.g., “EMP114223”). Users want to test extracting the number part of the username for validation.

Input

Username is “EMP114223”.

To fetch the extracted value, the following input is required.

1. EMP114223;3 (for index),

2.EMP114223;3-9 (for range)

Expected Result

The extracted value is “114223”, and it can now be validated (e.g., check if it has 6 digits)

Output

The result of the substring is stored in the {result} output variable as 114223, which can be utilized for display or further use.

Last updated

Was this helpful?