Home Search

DriveWorks Solo 21
TableSubstitute

Send Feedback

TableSubstitute

Substitutes text found in a column in the provided table.

Syntax

TableSubstitute([Table], [Column Index], [Old Text], [New Text], [Which Instance], [Ignore Case])

Where:

Table is the table from which to substitute text.

Column Index is the index of the column to have text substituted.

Old Text is the old text within the column to be substituted.

New Text is the new text that is to substitute the old text.

Which Instance (optional) is a number representing the occurrence of the old text that is to be replaced. 0 means every occurrence of the old text will be replaced.

Ignore Case (optional) is TRUE to ignore case when replacing.

Examples

RuleMeaning
TableSubstitute(DWGroupTableCustomers, 1, "Amazon Warriors", "Amazon Warriors Inc.", 0, TRUE)Will return an array of the table Customers with the old text "Amazon Warriors" replaced with "Amazon Warriors Inc.".

Example Data

Customers Table

CustomerNameCityCountry
Amazon WarriorsParisFrance
Bolton BurnersConcordUnited States
Boston BullsHanoverGermany
Cambridge CatsToulouseFrance

Example Outcome

Customers Table

CustomerNameCityCountry
Amazon Warriors Inc.ParisFrance
Bolton BurnersConcordUnited States
Boston BullsHanoverGermany
Cambridge CatsToulouseFrance

DriveWorks will return the table above as an array, which will look like:

Table returned as an Array
{"CustomerName","City","Country";"Amazon Warriors Inc.","Paris","France";"Bolton Burners","Concord","United States";"Boston Bulls","Hanover","Germany";"Cambridge Cats","Toulouse","France"}