$translate
Welcome to our Knowledge Base
Documentation | Blog | Demos | Support
< All Topics
Print
$translate
0 out of 5 stars
5 Stars | 0% | |
4 Stars | 0% | |
3 Stars | 0% | |
2 Stars | 0% | |
1 Stars | 0% |
Replaces segments of a character string with new text.
Syntax
$translate(source,pattern,replace)
Parameters
source | a character string, or an expression that evaluates to a character string |
pattern | a character string, or an expression that evaluates to a character string |
replace | a character string, or an expression that evaluates to a character string |
Return Value
Character string, consisting of source, with replace substituted for all occurrences of pattern.
Comments
Use $translate to substitute portions of source with replace. If source, pattern, or replace are not of a character data type, they are converted to a character data type before the function is applied.
If source is of data type ALPHA or VARALPHA, searches for pattern are case-insensitive; otherwise, searches for pattern are case-sensitive.
Example
$translate("the slow brown fox","slow","quick")
Evaluates to “the quick brown fox”.
% translates Smith to Smythe list all Employees where LastName = "Smith" format FirstName $translate(LastName,"ith","ythe")
Translates occurrences of Smith to Smythe in the field LastName.
See Also
Updated
ByJason Lee
Was this article helpful?
0 out of 5 stars
5 Stars | 0% | |
4 Stars | 0% | |
3 Stars | 0% | |
2 Stars | 0% | |
1 Stars | 0% |
5