Can an External Connection populate a Lookup Field by Display Name

I have an Object Type "Country" where the Name Title is the country text (we're not using any localizations). I have a Customer Database that I am importing via the External Database Connection into Customer Objects. One Property on the Customer Object is Primary Country which is a Lookup on the Country Objects. In the external database, the Country field has the country name string in the value. Importing this does not succeed in setting the lookup property. In this case I have no mechanism for getting the MFiles Object ID of the country into the SELECT query for the Customer Record to make the import work. I feel like there must be some way to have this work off of the Display value of the Lookup instead of the ID for these types of scenarios. But I cannot find the right explanation.

Country Object in MFIles = Andorra

Customer Country From DB = Andorra

Resulting Customer Object "Primary Country" prop = NULL


  • If it doesn't work directly by mapping the country value to the Country value list property, then I think this may require writing a small event handler than would do the linking between the objects: you would map the text value country name from the external database into a text property in M-Files and then your event handler would search for the Country object based on that text value and fill a value list property pointing to the Country object accordingly. The text property can be hidden from users via property definition permissions or metadata card configuration.