Round
7 min
rounds a value to the number of decimal places specified returns the integer nearest the value parameter if the fractional component of the value parameter is halfway between two integers, one is even and the other odd, then this function returns the even number this is called banker's rounding and it minimizes rounding errors that result from consistently rounding a midpoint value in a single direction syntax round(numberorcurrency) enabled for for a description of the business object categories, refer to notes on "enabled for" docid\ u26v9fecfs6ilwa0 pvjd business object category yes/no business rules before save rules yes business rules calculation rules (after save, with or without also recalculate on load) yes1 business rules calculation rules (before save or always, without also recalculate on load) yes business rules calculation rules (before save or always, with recalculate on load) yes1 business rules editing rules yes business rules initialization rules yes business rules read only rules yes business rules required rules yes business rules validation rules yes client expressions yes object permissions no services no ldap no mobile no quick actions (except ui quick actions) yes ui quick actions yes reports yes search/dashboard without field references no search/dashboard with field references no not fully supported in calculation rules that have a condition of after save or the also recalculate on load option selected it may fail if the rule's field is used in a grid, form, or saved search parameters parameter description numberorcurrency input value to perform round (number value or currency) placestoround (optional) number of decimal places to round return value returns a whole number value examples $(round(12 4)) returns this value 12 0 $(round(2 12345,2)) the above example returns a value of 2 12 rounds down and to 2 places $(round(2 12789,2)) the above example returns a value of 2 13 rounds up and to 2 places $(round(2 125)) the above example returns a value of 2 12 the number to round, 2 125, is halfway between two integers (2 12 and 2 13) so this function rounds to the even number (2 12) $(round(2 135)) the above example returns a value of 2 14 rounds up $(round(2 125usd,2)) the above example returns a value of 2 12usd the number to round, 2 125, is halfway between two integers (2 12 and 2 13) so this function rounds to the even number (2 12) it also includes the currency value (usd)
