Home Search

DriveWorks Solo 21
Replace

Send Feedback

Replace

Replaces part of a text string with a new text string.

Syntax

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.

Examples

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.

Example Outcomes

CustomerNameTextBoxReturn Value

Start Position

Number of Characters

NewSurnameTextBoxReturn Value

Result of the Replace function

"John Smith"65"Harrison"John Harrison
"Sandra King"84"Thompson"Sandra Thompson