AnsweredAssumed Answered

Trying to use Custom Scripting (JS) Map Function in Boomi. Have to write if & else statement and use a divide functionality.

Question asked by apatel@diligent.com on Mar 8, 2017
Latest reply on Mar 14, 2017 by apatel@diligent.com

Trying to use Custom Scripting (JS) Map Function in Boomi. Have to write if else statement and use a divide functionality.  Getting an error when trying to  test this map function. Below is the script can someone please review and provide feedback:

 

var x = Field1;
var y = Field2;
var z = Field3;
if (x.match(/^.*matchtext$/)){
alert( (y/12).toFixed(8) )
}else{
z == y
}

 

The script has inputs as x and y where x is Character. Please note that filed one(x) is a picklist value field which has value with Space ( ). Field y and z are number field with decimal.

 

Any help will be appreciated.

Outcomes