How to check whether the enumeration is empty?

0
I have a domain model ‘Temp’ and it has a entity ‘XYZ' which is the enumeration type and has value ‘AB’ and ‘BC’. Now I am uploading a .csv file with two rows and have XYZ as a field. One row has ‘AB’ as a value and second row has ‘CD’ as a value.   I have added the validation in microflow to first check whether my XYZ field in .csv file is empty or not. (if($fileentity/XYZ = empty)) But the result I am getting is bit different. SUppose the XYZ value in file does not match with the enumeration value, the if condition gets true for (Empty), which is not the case because even though my .csv file XYZ value does not match with enumaration value but still it’s not empty right?.   Can anyone help me out with this please?
asked
1 answers
3

I would suggest an extra enumeration value like ‘unknown value’ and use a microflow on import to parse the value in the csv to the correct enum value. If it's not one of the known values of the enum and not empty, you could set the ‘unknown value’. Perhaps map the unknown value to a helper entity or attribute to still have the data in your model. 

But if your expecting more of these ‘unknown’ values, I would refactor my enum to a entity of its own. Then you can create values in runtime as needed.

answered