DEV Community

Cover image for :Round to - In Bubble.io
Jason Cruz
Jason Cruz

Posted on

:Round to - In Bubble.io

How to :round to in bubble.io app. The documentation for me wasn't very clear, so I'm being pro-active and documenting the glimmer of achievements on dev.to for other nocode coders.

Image description

Very simple. (when you know how to do it, lol)

Lets say you want to get an average on a number. You would use :average in the editor like this pic below.

Image description

but what if that average ends up being an average of 3.8 or 0.234? I had come across this problem, and wanted to share my discoveries.

I'm using a Star Rating plugin - Highly Recommend it, but just like everything, it needs to be fully setup before it actually can be used properly. Message me if you want me to post a how to on this bubble plugin. This plugin can be found by going to your plugin's section and in search type in "Bootstrap Star Rating Input". Also along with documentation found here

Suppose you want to round to the nearest integer. Inside the bubble editor you want to :round to . After placing the :round to you must enter a digit after, i will explain below.

If your :average is:

Image description

Image description

3.8 and you want to get to a 4:

:round to 0
Enter fullscreen mode Exit fullscreen mode

If your :average is:

0.234 and you want to get to 0.2:

:round to 1
Enter fullscreen mode Exit fullscreen mode

If your :average is:

0.234 and you want to get to 0.23:

:round to 2
Enter fullscreen mode Exit fullscreen mode

Image description

Image description

So on, and so forth. I sincerely hope this helps you.

Follow, Like, Unicorn - I would.

Top comments (0)