Mid
Last updated
Was this helpful?
Last updated
Was this helpful?
This pre-built action, located under @Generic Element, instructs Avo Assure to fetch the single character in the middle of the input string and store the result in a dynamic variable.
Syntax
Input Value: <string>
<string >
(Required)
It is the string of characters from which the middle character will be fetched
Output Value
<Dynamic Variable>
(Required)
This variable stores a specific single middle character of a string
<Dynamic Variable>
(Optional)
This variable stores the status as true or false
Example
Extracting the Middle Characters from a String Using the Mid Action The Mid action takes the value from the Input value column (Johnson) and extracts the middle character(s) from the string. The extracted middle portion of the string is stored in the {Mid value} variable, while the operation status is stored in the {status} variable with the following possible values:
True – if the substring is successfully extracted
False – if the specified position is invalid or the input is empty
Knowledge Bites: Below are some examples of different string scenarios
Text Strings
Automation
a
Numeric Strings
123456
4
Special Character
abc@domain.com
a
Alphanumeric strings
ID2025
0