While using APT and Travel Docs, I have found that the Calculate() action is not working. It is adding the values together but then not matching the total as it should and returning 'false'.
For example it will add 2.00 + 2.00 =4.00 and will return false.
Any suggestions on why this would be happening?
Answer by jfernan147 (4089) | Mar 15, 2018 at 01:33 PM
Ultimately, Calculate (which is deprecated - you should use CalculateFields) uses the vbscript Eval function to determine if the expression is valid or not. I have seen that Eval function behave oddly with certain combinations of numbers.
Here is the relevant code:
writeLog("Formatted Expression: '" & sExpression & "'"
sCResult=Eval(Trim(sExpression))
sExpression="<expression from log>")
scresult=Eval(Trim(sExpression))
wscript.echo scresult