Action script to trim string to characters between two given values representing characters in the stringextract part of a string from a route variable.
Example:
The following example will take the last three digits from the variable 'nj.Source' and store them in the variable 'targetExtension'.
The Route Variable nj.Source contains '0383208100'.
The MidString step is configured as:
Code Block |
---|
Input: nj.Source
Start index: 7
Length: 3
Output: targetExtension |
The result is that targetExtension will contain the value '100'.
Input
Takes name of a variable containing string to trimthe value to extract a sub string from.
Start index
Takes value to start trim from, this cannot take a higher value than length.
Length
Takes value which defines the length of the resulting string, this cannot exceed the length of the string being trimmed.
Output
Assigns variable name to variable containing resulting stringThe index into the Input string to start from.
The value must be zero or greater.
The value must be no more than the length of the input string.
The index is zero (0) based.
So if you want the first character of the input then you should specify:
Start index: 0
Length: 1
Length
The number of characters to extract. If the Start Index + Length goes off the end of the string then a result will still be returned but it will be less than the desired length.
Output
The name of the Route Variable the resulting value is stored into.