Showing a Float as a Percentage

0
Hi all, I would like to show a float as percentage on a screen. The question was already ask a couple of year back and the solution is a workaround. https://forum.mendix.com/questions/2783/Showing-a-Float-as-a-Percentage Is there a new way to do that? Thx!!
asked
4 answers
1

Mendix 5.21 has the Text widget, which allows you to format one or more attributes into a text value.

https://world.mendix.com/display/refguide5/Text

answered
1

It sounds like you actually do not want to use a float here, but you should use a Decimal instead. A Float cannot be used to accurately represent decimal values, while a Decimal can (which is the reason why Mendix introduced Decimal and got rid of Currency, which was in fact a Float).

answered
0

You could try the microflow label widget. Does not store an attribute, but needs a microflow to format your float as a string

answered
0

Depending on your use, you can probably accomplish this with CSS as well - using the :after selector to add a % sign. Here's a sample that does the same with the :before selector for currency.

answered