Add Thousand separator to string

0
I have a excel file with a column called “rating”, filled with various numbers. All this numbers don’t have the thousand separators, but i need them. For example a column with the number 70000 should be 70.000 I know that i can use a MF to parse a value in the excel import template, do you have any suggestion for doing it? Or maybe MX Studio pro have a function to do that automatically? thanks in advance
asked
2 answers
2

Hi Alessio, 

Do you want to add the thousand separator in a string, or do you want to display it with a thousand separator on a page? 

If you just want to display it on a page, use a decimal attribute. Then open the properties of the value you are displaying and select ‘Group digits’ as shown below.

 

If you want to add the decimal separator in the actual string value you do need to write logic in a microflow that processes your data. You can use the formatDecimal function for this, as can be found here: https://docs.mendix.com/refguide/parse-and-format-decimal-function-calls

If you parse this value:

formatDecimal(1234, '#,##')

the output will be: 

'1.234'

Please note that it also depends on your language settings.

answered
-1

See the documentation here: https://docs.mendix.com/refguide/columns-document-template

This part:

1.4 Group Digits (Only for Numeric Attributes)

For ease of reading, numbers with many digits before the decimal separator may be divided into groups using a delimiter. This property defines whether the end-user will see these groups, or not.

Default: False

Regards,

Ronald

 

answered