How to display attributes together

In my database I have 2 attributes 'Duration' (integer) and 'Durationunit' (Enum). E.g. '12' and 'Minutes'. On all my grids I want both attributes always to display together like '12 minutes'. Cannot save the combined value in the database, because I do not know the language to display in it. How?
2 answers

You could use a calculated field filled by a microflow. In the microflow use getcaption to get the enum. Because this microflow is started by the user you will get the right language. Create a string where you combine the elements and return this string from the microflow. Note that using calculated attributes has some performance issues. See also the post about translations in Mendix Multi language design models. Results of a knowledge network day.


You could also use the "Format String" widget