How to add a unit of measurement to entity fields e.g. 5%

Hi there,   Let’s say I have a decimal attribute with the value 5.20, how would I be able to add a unit of measure to this such as £5, or 5% or 5months etc...   I want to apply this to both input fields, labels and grids. I’ve tried using input masks such as 9.99% for percentages but it then say’s invalid number on input. I’m assuming it’s reading the ‘%’ as part of the value, when I just want it to be for display purposes.   An example of how Excel has field masks on grids   An example of a Mendix grid without field masks 
2 answers

Hi Lee,

You can do this in modeler itself as you are returning the dynamic values in the list in the format of {unit}% you can append the % symbol over there itself.


Hope this helps.


One way of doing this is using css to style a content before or after the text.

Check out this post:

On other option is to use a listview, gallery, template grid or datagrid 2. With these you have more option to style the displayed values and use a text field with addition sign.