Calculated Value in Entity, cannot set Input field to Read-Only afterwards. Bug?

0
I created an entity, for example: [Person] Firstname Lastname Fullname   I create multiple pages where the Fullname was also an input field, editable   After the fact, I changed the Fullname in the Entity to a calculated field (calling a Microflow, that combines Firstname and Lastname)   Now Studio Pro (10.6.3) throws an Error saying the Widget  on pages that reference Fullname should be set to Read-Only.  Opening such a page shows the Widget Read-only, the property 'Editable'  has a grayed out option 'Never (read-only)', but the error remains. The only thing I can do is to temporarily set the entity field back to normal (not calculated), find the pages again, manually set the 'Editable' to never and then change the Entity field back to calculated.   This feels like a bug to me in Studio Pro 10.6.3, since I cannot correct the error on the Page Widget (grayed out, only one option in the properties for 'Editable')
asked
1 answers
0

That sounds like a bug indeed and I would report it by sending a ticket to support via https://support.mendix.com/hc/en-us.

 

This is not your question, but I would recommend against using a calculated value for something like a fullname. This means the value is recalculated every single time your object is retrieved or changed, even though the name of a person will rarely change. This has a negative impact on performance. A better way to do this would be to fill the fullname attribute when a name change is committed, which I assume can only be done in one place in your app. If name changes happen from multiple places, you might want to consider a before commit event instead.

answered