JavaScript functions Math.round()

Good day all.
My table view returns a calculated decimal value that I want to round to the nearest integer before I display the value on the page. Can I use the JavaScript Math.round() function which rounds a number to the nearest integer?
If so, how to I use it and other JavaScript functions in Wappler.
Thanks in advance

To run JavaScript functions you have 2 options:

1 - Create an AppConnect formatter
2 - Use the “Run JavaScript” step inside a Page or App Flow, e.g.:

Note Wappler already has a formatter for rounding numbers:

I think one if the most difficult parts of learning wappler if coming from a more traditional platform is to “let go” all your previous workflows and do things via the many inbuilt wappler features.
In almost every common case you will never need to resort to .js functions as wappler has an inbuilt formatter to do the same thing.

5 Likes

Thanks Brian and Apple.