Hi,
Is there a solution with wappler to round a number to its “perfect” integer?
For exemple: 1,234,567 becomes 1,234,000 or 1,234 becomes 1,000
PS. I don’t know another term for “perfect” but you probably understood what I mean
How are you currently rounding your numbers? Is this on the client side or in server connect?
Client side
Do i understand you correctly that you want to show 1000
instead of 1234
?
What if the number is 1600
?
I want the number to end with at least two 0. So no rounding if the number is 1600
My question still remains - what’s your logic for 1289
does it become 1300
or 1200
?
1201 to 1250 becomes 1200
1251 to 1299 becomes 1300
Then it’s simple maths:
{{((your_value / 100).round()) * 100}}
1234 becomes 1200
1289 becomes 1300
1 Like
Thx Teodor for quick feedback
1 Like