REPLACE
Replaces every occurrence of the search text with the replacement text.
A backslash in a formula string starts an escape sequence: \n is a newline, \t is a tab, \" is a double quote, and \\ is a single backslash. Single-quoted strings work the same way, so '\' is a syntax error. Other sequences, like \d, are kept as written.
Categories: Text
Syntax
REPLACE(text, search, replace_with)
Examples
Example 1
Input
1
{
2
"my_action": {
3
"message": "We will build what we need"
4
}
5
}
Formula
REPLACE(my_action.message, "we", "I")
Output
"We will build what I need"
Example 2: Use `\n` to match a newline
Input
1
{
2
"my_action": {
3
"message": "line one\nline two"
4
}
5
}
Formula
REPLACE(my_action.message, "\n", " ")
Output
"line one line two"
Example 3: Use `\\` to match a single backslash
Input
1
{
2
"my_action": {
3
"path": "C:\\Users\\me"
4
}
5
}
Formula
REPLACE(my_action.path, "\\", "/")
Output
"C:/Users/me"
Sample actions
Select an action to inspect
You can also click "Copy actions" and paste them in your Tines story to see how they work.