I am attempting to roun a number that is coming out of one of my workflows to the first decimal point for reporting purposes, however VCO doesnt have the Math.round function. Does anyone have any reccomendations on an alternative way to do this?
vCO has Math.round(); Just not documented in the API search ...
var float1 = 1.2345;
System.log(Math.round(float1));
[2012-05-16 18:37:45.563] [I] 1
Hi!
1. You could try to give the scripts access to the Java Math class. See here for an howto:
http://mighty-virtualization.blogspot.de/2011/01/vco-access-to-java-classes.html
2. Try to find some examples how to build a round in pure Javascript. maybe you can find something here:
http://www.vcoportal.de/2012/03/140bytes/
Cheers,
Joerg
vCO has Math.round(); Just not documented in the API search ...
var float1 = 1.2345;
System.log(Math.round(float1));
[2012-05-16 18:37:45.563] [I] 1