Returns a text string with every occurrence of searchString in specified text replaced by replaceString.


Substitute ( text ; searchString ; replaceString )


text - any text expression or text field

searchString - any text expression or text field

replaceString - any text expression or text field

Data type returned 


Originated in version 

6.0 or earlier


This function is case sensitive. Compare to the Replace function.

Multiple substitutions are allowed when you enclose each pair of searchString and replaceString parameters within brackets [ ] and separate them with semicolons. Substitutions are performed in the order you specify, so one substitution may be further modified by subsequent substitutions. FileMaker clients support up to 999 nested substitute conditions. For example:

Substitute(text; [search1; replace1]; [search2; replace2]; ... [searchN; replaceN])

Example 1 

Substitute ( Description ; "WYSIWYG." ; "What you see is what you get." ) replaces every occurrence of the acronym "WYSIWYG." in the Description field with the phrase What you see is what you get.

Example 2 

Substitute ( text ; ["a";"A"] ; ["b";"B"] ) replaces every lowercase a or b with A or B.