Replaces part of a text string with a new text string.
Replace([Original Text], [Start Position], [Number of Characters], [Replacement Text])
Where:
Original Text is the string that you want to replace characters in.
Start Position is the position of the character in Original Text, that you want to start replacing from.
Number of Characters is the number of characters in the Original Text, that you want to replace with the Replacement Text.
Replacement Text is the string of characters that will replace the chosen characters in Original Text.
Rule | Meaning |
---|---|
Replace(CustomerNameTextBoxReturn, 6, 5, NewSurnameTextBoxReturn) | Replaces five characters, starting at the sixth character in the CustomerNameTextBoxReturn string, with the return value from the NewSurnameTextBox. |
CustomerNameTextBoxReturn Value | Start Position | Number of Characters | NewSurnameTextBoxReturn Value | Result of the Replace function |
---|---|---|---|---|
"John Smith" | 6 | 5 | "Harrison" | John Harrison |
"Sandra King" | 8 | 4 | "Thompson" | Sandra Thompson |