2015-03-25 12:10 PM
Hopefully this is quick for someone.. I'm just trying to create a function to roundup a value to the nearest integer. I'm using WFA v2.2. I've created this:
def roundup (num)
My problem is that it returns a decimal value and OnTap needs an integer value to increase the size of a volume. Example, if I enter 12, I get 12.0. If I enter 12.5, I get 13.0
I've tried using ((int) Math.ceil(num)); to return an integer, but I get an error that it's an Illegal expression.
Solved! See The Solution
2015-03-25 01:36 PM
Instead of Math.Ciel(num) try Integer.ValueOf(num). If you look at the "actualVolumeSize" function, it appears that "return (int)(Math.Ciel(num))" may also work, or just "(int)(num)" if you really just need the integer component and are not that concerned about rounding up.