When using format_toInt as below :
var RET_CODE=WOB._cmpc
RET_CODE = format_toInt(RET_CODE) + 1
setVar('JOB1_RET_CODE',RET_CODE)
RET_CODE =0 + 1
setVar('JOB0_RET_CODE',RET_CODE)
we do not get the expected value.
Release : 12.3
Component : Workload Automation DE
The following documentation confirms that the format_toInt function returns a "string" :
Integer Javascript Function
Specifies the value to convert into an integer format string.
In fact it is a bit confusing as it says "format_toInt" but giving a "string".
The recommended solution is to use the parseInt() function. Example :
c=parseInt("1888")
d=parseInt("1888")
e=c+d
The parseInt() function will allow to addition the values.