I am working on a Job Requisition approval flow that calculated available fte based on assigned resources active requisitions and the requisition being requested. what I am running into is when I do a calculation on the FTE it turns the number from a simple one decimal place to a 16 decimal place mess. for example it turns .4 into .3999999999999998 which reall messes with my calculations. does anyone know how to limit the decimal places when using the Double data type? or know why it would be rounding so funny?
Thanks
The following should work for you...
(parseFloat(VARIABLE) / 1000000.0).toFixed(0)
Here is an example from one of my flows:
(parseFloat(EmpInfo_NEW_VALUE_1) / 1000000.0).toFixed(0)
You might need to change the number of 0's for the divide by but it is working well for my flow.
Good luck
Shane
There is a javascript function in processflow called round.The format of the function is round(num, decimalPlaces).