Correct approach when using dynamic helper attributes?

1
Lets say I have an entity with attributes "Lenght","Width", "Depth". I retrieve the object to display these values in UI (Using Retrieve in the microflow) but I would need to display also "Volume", which is Lenght * Width * Depth. Only thing I can think of is creating an attribute and then change it after the object was retrieved..but it seems to me a bit odd, create a persistent attribute just for calculation.
asked
1 answers
0

You can use a microflow attribute that does exactly what you said: calculate it on the fly. It won't be a column in your database.

Microflow attributes should only be calculated when they are used but I know that there is a 'bug' in Mendix that the attribute also is calculated when for example just retrieving a list of objects in a microflow. That can cost you performance but most times an calculated attribute will help you out, and they're intended to do this kind of calculations.

answered