Tuesday, June 18, 2024

OIC Javascript Function - Gen3 - the function definition contains unsupported synstax. The output parameter must be named.

While we are creating a javascript function in OIC Gen 3 version, we have received below error:

the function definition contains unsupported synstax. The output parameter must be named.



The javascript code used:

function replaceString(value, str1,str2){

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

return output;

}

Solution:

If we declare any variable like output here, we have to also add a var keyword before it.

Modified js code:

function replaceString(value, str1,str2){

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

return output;

}


No comments:

Post a Comment

Featured Post

OIC - Solution for 404 Not Found Error When Calling a Local Integration dynamically in OIC project

Issue: A 404 Not Found error occurs when dynamically calling a local integration within a project in OIC. Error details: CloudInvocationExc...