Hi,
I want to replace special character with space " ". I am using site property configurable for replacement of character.
it chage special character with double quotes " ".
But when I try to hard code " " in Replace, it works fine.
Is there a way to add space through site property?
Hello.
Did you try to add just a space on the site property? Is that it?
Thanks
Hi,I guess this problem might be because of how Outsystems transfer data within site properties. You may try to use local variable and get some sync with site property.
Could you please share the pattern , test value and expected result over here ?
Hi Lovish,
Did you debug to check what value the site property contains when the code is running?
That said, afaik in Oracle databases, a single space is used to denote "empty string". Are you using an Oracle database? If not, perhaps the Platform still interprets a single space as "empty".
As a workaround, you could either hardcode the space, or if you really need it variable, but can restrict yourself to ASCII, you could use an integer instead of a character, and use Chr() in the Replace.
Add below script in client action
// Example string containing special characters
const inputString = $parameters.inputstring;// Regular expression to match special characters
const specialCharRegex = /[!@#$%^&*()_+]/g;// Replace special characters with "Q"
const replacedString = inputString.replace(specialCharRegex,
$parameters.Replacesymbol );
$parameters.Out1 = replacedString;
assign $parameters.Out1 value in site property
Hi @Lovish Goyal
Just the replace() function available in the outsystems.
Replace(String value,Text you want to replace,text that will replace)
like ("outsyste","e","em") = outsystem
you can use the nested replace function like one replace function inside another function. that will solve your problem.