20
Views
4
Solved
###### Round Built-in Function Reactive Bug
Question

Have you encountered bug in OS in using Round Function?

e.g:

Round(5.605, 2)

Expected: 5.61

Result: 5.60

I used javascript to solve tho

Solution

Hi Jester,

Please refer below.. As per OutSystems, Client and Server side logic, result is depends on Factional digit (2 in your case). If the fractional digit is greater than 0, it will give your expected result, else logic will calculate nearest result.

Again the fractional digit is depends Odd or Even

Hi Jester,

this is as expected, the round function works differently dependent on where you use it.

In the client logic it rounds half to nearest even.

See description of the function in Service Studio for full overview on where it works in what way.

Dorine

Solution

Hi Jester,

Please refer below.. As per OutSystems, Client and Server side logic, result is depends on Factional digit (2 in your case). If the fractional digit is greater than 0, it will give your expected result, else logic will calculate nearest result.

Again the fractional digit is depends Odd or Even