Built-in Functions → replace
replace() is a string function that returns a string with substrings replaced by new substrings.
Signature
replace(string field, string old, string new)
The following table illustrates the replace() parameters:
| Parameter | Description |
|---|---|
| string field | string to search |
| string old | string to search for in string field |
| string new | string to replace string old with in string field |
Returns
string
Example
Replace the product category data that match "Electronics and Hardware" with "Electronics.
replace(Sales.Product.CATEGORY, "Electronics and Hardware", "Electronics")