The Mid function returns a specified number of characters from the chosen starting position.
Mid([Text], [Start Number], [Number of Characters])
Where:
Text is the string of text or a reference to some text .
Start Number is the position of the first character you want to retrieve.
Number of Characters is the amount of characters you want to retrieve from the specified starting position.
To start retrieving characters from the beginning of the text, the Start Number must be set to 1.
Rule | Meaning |
---|---|
Mid(ProductCodeTextBoxReturn, 1, 3) | The Mid function will retrieve 3 characters from the return value of the ProductCodeTextBox, starting at the first character in the text. |
ProductCodeTextBoxReturn Value | Start Number | Number of Characters | Result of the Mid function |
---|---|---|---|
"P7100GH" | 1 | 3 | P71 |
"WT567LL2" | 5 | 4 | 7LL2 |