New Bug Encountered: Percent value in VC changes to 0.00% after a Sync

This issue was originally noticed back in July but was not reported as a bug.

The problem seems to stem from defining a VC Percent type column when the values used in the calc the value are of Number type.

VC Percent column = Number1 / Number2

When entering or editing a row, the VC column calculates the value correctly. Once saved and a Sync is performed, The VC column reverts to 0.00%.

Editing row and immediately after Save, Percentage Value is correct.

After Sync, the Percent value reverts to 0.00%

2 3 436
3 REPLIES 3

Thanks for Reporting John!

Former Community Member
Not applicable

What youโ€™re seeing is the difference between integer division and regular division. At minimum, itโ€™s a bug that youโ€™re seeing two different results from the same expression.

The best workaround is to ensure that one of the division operands is a Decimal rather than a Number. The idiomatic way to do this would be [Number1] * 1.0 / [Number2].

@Steve_Howard I agree 100% its integer division and I posted the exact same workaround in the post that re-discovered the bug.

You can also resolve by defining the numbers as Decimal with ZERO decimal digits.

And yes, the main issue is that you see two different results at different times - client calculation versus server calculation.

But also, If I may be so bold to say so, the server should โ€œknowโ€ what data type the result is being stored in and adjust the calculation according with the most prominent intent - especially in a no/low code environment.

Top Labels in this Space