I just wasted 2 hours because the User Defined Function facility messes up when you specify an argument name that begins with Replace e.g ReplaceText or ReplaceString.
a) the Save Script Button would report this error ...
Encountered "input .Replace" at line 5, column 13.
Was expecting one of:
"Workflow" ...
"output" ...
"bool" ...
...
"float" ...
"list" ...
"map" ...
"var" ...
"htmlpage" ...
"string" ...
"date" ...
"void" ...
"this" ...
"criteria" ...
"given" ...
"declare" ...
"fetch" ...
"ensure" ...
"all" ...
"from" ...
"times" ...
"assumed" ...
"unique" ...
"one" ...
"each" ...
"matching" ...
"row" ...
"update" ...
"delete" ...
"insert" ...
"into" ...
"print" ...
"info" ...
"alert" ...
"cancel" ...
"return" ...
"submit" ...
"exclude" ...
"join" ...
"success message" ...
"sendmail" ...
"language" ...
"reply" ...
"content" ...
"type" ...
"subject" ...
"message" ...
"cc" ...
"bcc" ...
"to" ...
"pattern" ...
"AS" ...
"BULK" ...
"show" ...
"hide" ...
"field" ...
"select" ...
"deselect" ...
"selectall" ...
"deselectall" ...
"set" ...
"ui" ...
"enable" ...
"disable" ...
"inserthtml" ...
"share" ...
"unshare" ...
"application" ...
"section" ...
"page" ...
"tab" ...
"form" ...
"view" ...
"count" ...
"empty" ...
"is" ...
"not" ...
"exists" ...
"sort" ...
"by" ...
...
...
"namespace" ...
"function" ...
"using" ...
...
"!" ...
"+" ...
"-" ...
"groupCount" ...
"(" ...
"{" ...
...
...
...
...
...
...
...
...
...
...
"TRUE" ...
"FALSE" ...
"null" ...
...
"input" "." ...
Gaev