Wednesday, March 24, 2021

OIC - Javascript - Replace String custom function

Usecase: If we use default replace string () function , what we observe that it does not allow to activate the integration. So we need to create a custom javascript function to replace a string with another one.

Here we will replace "_" with "/".

JS code:

function replaceString(value, str1,str2){

output = value.replace(new RegExp(str1, "g"), str2)

return output;

}

Implementation steps with screenshots:










No comments:

Post a Comment

Featured Post

OIC XSLT: Execute Only When At Least One Field Has Value and None Are Blank

๐Ÿ”ท OIC XSLT: Validate Fields Before Executing Logic ๐Ÿ”น Requirement Fields: field1, field2, field3, field4, field5 ✔ Execute only when: At le...