Functions

REPLACE

Replaces all occurrences of a specified string value with another string value.

Syntax

string REPLACE(string value, string oldValue, string newValue)

Inputs

Object Data Type Description
value String The original string to look in.
oldValue String The old string to replace.
newValue String The new string to put in place.

Example

REPLACE("Product", "Product", "Software")

Will replace all "Product" instances with "Software".

Or for a more specific example: There are certain filename characters that are not valid for filenames in SharePoint ~ " # % & * : < > ? / \ { | }.

If you find that your file names have any of these characters then you can use the REPLACE function to replace these with something that is valid. An expression you could use:

REPLACE(FileName, "[CHARACTER]", "_")

This would replace the specified character in the file name with an underscore.