Encountered an error when attempting to change the attribute type in the Domain Model

Encountering an error when attempting to modify attributes within the Domain Model. Specifically, when I try to change the type of an attribute, such as 'phone', from string to integer, I receive an error message. This occurs consistently during operations like 'On list + Add'. Are there any known restrictions or limitations regarding changing attribute types in Mendix? Additionally, could you provide insights on how to resolve this issue or any recommended approaches? Your assistance in addressing both points would be greatly appreciated.     Thank you.
2 answers

Hi Naresh,


we cannot change the string to integer, when we have the data.

and string functions will raise an error when changing the datatype of that attribute.

because they don't applicable to the integers.


Go through the following Documentation, to have the clear idea on Attribute Datatype Migration.


Attribute Type Migration


Hi there,


On your user_management page is a filter above your datagrid which is using a contains which is not possible with an integer hence the error.


Under the element section of your error it will say which filter is having an issue.






Also what the other person stated is also true, when you change a type of attribute be aware of lose of data. Therefor it can be wise to add a new attribute and migrate all existing data towards that attribute and use that attribute as the new field. But before doing all that you might want to validate your requirements.


Kind regards,