Compare Lookup Values based on Enumerations

0
I have a Look Up Table called LuContactType LuContactType consists of 3 Attributes one of which is "Name". Name is an enumeration. I have then associated this Lookup Table "LuContactType" to another entity called Contact. I want to compare the value of $Module/Contacts.Contact_LuContactType in a micro flow. Path will autocomplete the expression as far as $Module/Contacts.Contact_LuContactType I then am unable to add anything else to this expression. If I add a comparison to the enumeration value I get a type mismatch and Invalid argument types Contacts.LuContactTYpe and Enumeration Contacts.ContactTypeEnum I am unable to compare it against a string value and I am unable to extend the relationship beyond the basics of $Module/Contacts.Contact_LuContactType I have only started using Mendix recently and I have to say I am learning to hate XPath with an all consuming passion.
asked
5 answers
2

Use a retrieve over assocation from customer to get a LuContactType object, check whether is object is not empty and then compare the attribute of the object with the enumeration.

answered
2

Do like this

answered
1

Don't exactly understand what you're trying here. Several ways to fix this. One could be to create an enum variable, which holds the value you need to compare against. Then use this in the microflow to retrieve the LUcontactType with LuContactType.Name

answered
1

If you are building the xpath you have to walk over the reference to the enumeration, so it is somethinl like: $Module/Contacts.Contact_LuContactType/LuContantType/Name = modulename.Name.enumerationoption1

Regards,

Ronald

answered
0

Don't exactly understand what you're trying here. Several ways to fix this. One could be to create an enum variable, which holds the value you need to compare against. Then use this in the microflow to retrieve the LUcontactType with LuContactType.Name

answered