Returns a table with matching items replaced with new items from a given search table.
SppFindAndReplaceInTable([Table Array],[Column],[Include Header In Data to Search],[Include Header In Results],[Table Containing Find And Replace Strings])
Where:
Table Array is a table array such as the data in a standard table or the result of the QueryDataValues function.
Column To Search is the column in which to set the value. A number starting at 1 for the first column, or 0 to find and replace across all columns.
Include Header In Data to Search is TRUE to include header values in the data that is being searched.
Include Header In Results is TRUE to use the same headers as the first row of results.
Table Containing Find And Replace Strings is a 2 column table array (such as the data in a standard table, or the result of a QueryDataValues function), where the first column contains the text to find and the second column is the text to replace.
Rule | Meaning |
---|---|
SppFindAndReplaceInTable(DWLookupProductData,1,TRUE,TRUE,DwLookupFindAndReplace) | Will return a table based on the table ProductData but with items found and replaced with the contents of the table FindAndReplace. |
Make | Model | Color | Mileage |
---|---|---|---|
Volkswagen | Golf | Blue | 40000 |
Ford | Escort | Red | 55000 |
Renault | Kangoo | White | 37000 |
Ford | Mondeo | Red | 28000 |
Mazda | 2 | Red | 82000 |
Volkswagen | Golf | Silver | 110000 |
Volkswagen | Polo | Blue | 72000 |
Ford | Mondeo | Red | 54000 |
Renault | Laguna | Black | 46000 |
Find | Replace |
---|---|
Ford | Ford Motors |
Volkswagen | VW |
Mazda | Mazda Motor Corporation |
Make | Model | Color | Mileage |
---|---|---|---|
VW | Golf | Blue | 40000 |
Ford Motors | Escort | Red | 55000 |
Renault | Kangoo | White | 37000 |
Ford Motors | Mondeo | Red | 28000 |
Mazda Motor Corporation | 2 | Red | 82000 |
VW | Golf | Silver | 110000 |
VW | Polo | Blue | 72000 |
Ford Motors | Mondeo | Red | 54000 |
Renault | Laguna | Black | 46000 |