Add optional Rounding Mode to Round() and FormatDecimal()
49
Views
1
Comments
New
Builtin & User functions

I propose adding an optional parameter to the Round() and FormatDecimal() functions to select the rounding strategy (e.g., Round Half Up, Round Down, Ceil, Floor). 

Currently, OutSystems client-side uses Decimal.js with a hardcoded default of ROUND_HALF_EVEN . While standard, industries like Fintech and Brokerage often require different methods (like ROUND_HALF_UP for taxes or ROUND_DOWN for fractional shares). 

Update the built-in functions to support an optional rounding parameter: 

FormatDecimal(Decimal, Integer, Text, Text, [RoundingMode]



There are several Forge components with rounding functions server and client side, that I doubt OS will ever implement your idea.