Customer Portal

Comments 3

  • Avatar
    slechtaj
    0
    Comment actions Permalink
    Hi,

    you may simply use replace() CTL function. Just like as follows:

    $out.0.myString = replace($in.0.myString, "\u001A","");;

    Where the first argument is the string where you want to search for characters from the second argument. All matching expressions in the string will be replaced with the third argument. You should keep in mind that it is regular expression replace function, therefore you should be aware of special chars used in Java regular expressions.

    Hope this helps.
  • Avatar
    yichuansancun
    0
    Comment actions Permalink
    Hi I tried with the following code but getting error:


    $out.0.* = replace($in.0.*,"\u001A","");


    Error:

    Function replace(string,string,string) is not applicable for the arguments (record(Input_Address),string,string)


    How can I convert my record to be string?

    Thanks,
    Perri
  • Avatar
    dpavlis
    0
    Comment actions Permalink
    You can not use the replace function on the whole record - $in.0.* - as there may potentially be some non-string fields.

    You need to apply it on individual string fields - see the first example.

Please sign in to leave a comment.