Group digits when using formatDecimal

0
I'm trying to group digits when using formatDecimal and tried using the solution found online which is  formatDecimal(1234.56, '#,###.#') but an error always occur.   Scenario is this one below..   The first two numbers (Both Decimal data type) are retrieved from database and the last row data is shown by using expression of adding the first two numbers.   Can you please help me on how to do this properly? Right now I used formatDecimal then round function temporarily that's why it has 2 decimal places.   Thanks and Regards everyone.
asked
3 answers
0

The error is telling you that you did not provide a decimal. Could it be that you are working with strings instead of values?

Regards,

Ronald

 

answered
0

@Marco Hmm its on Decimal tho. Is there a possibility that it doesn't work on version 10.8.1?

image.png

answered
0

It only accepts one parameter (the decimal) if you use the formatDecimal in a nanoflow (and probably any other client-side display functions).

I would expect only using formatDecimal should give some proper formatting, like 123,456.78 but it depends on your locale. You can inspect your locale by entering mx.session.sessionData.locale.numbers in the console.

Documentation link

In a nanoflow, this will format the decimal using the format appropriate to the locale from the language of the current user in Mendix apps.

image.png

answered