Populating Enumeration from csv

Hello, I have a large csv file (350+ values) which I would like to import into a Mendix Enumerator, but it appears that we are only allowed to populate them manually which will take me a very long time to do. I've managed to import my csv into an Entity, but I can't use it as a data source for my dropdown. Is it possible at all to automatically populate an Enumeration from a csv file?
2 answers

Hi Ilja,

A good alternative is to import into a non-persistent entity, where you can put the value in a String attribute. In a microflow you can then decide how to populate your enum, checking the string value (eg: if contains(trim($TempObject/Stringbute), 'value X') then enum_ValueX else empty)


EDIT: I think I know what you mean now. I first interpreted your questions as you looking for a way to do the following: filling the enum attribute in your objects:


However, you want to change the enum options that are a part of this:


Which in deed can be done using the SDK, but which I would not recommend.

Instead of using an enum, you can use a different object and a reference as you already suggested. This way you can add search functionality as well, which can be useful with 350 options.

This way you can make it easy selectable in your window:





I believe this is possible with the Mendix Model SDK. I'm not sure actually building this script will be faster than writing 350 records into an enumeration, but if you do end up building something, I'm sure the community would ultimately benefit.