Set custom association between entities populated importing data from an external data source (DB or Excel or CSV)

0
New to Mendix here. I would like to create a Mendix app that use data imported from the company CRM. The data source tables are associated with ID fields. Let’s say:         Table1: t1ID, t1field1, t2ID         Table2: t2ID, t2field1, t2field2 Table1 is associated to Table2 with the field t2ID For what I understood, in Mendix, associations between records in entities are done automatically when you enter data through Mendix forms, but how can I declare an association for imported data? When you set an association in the domain model, you simply join two entities. You cannot declare which are the related attributes. How can I set the association with t2ID? Thank you for any help. Andrea
asked
1 answers
4

In the domain model you can specify relations between entities.  To associate 2 objects, you need some logic in you application, e.g. in Mendix forms you can use reference selectors to select the related objects. You can also set associations in microflows with use of the change object activity. See also documentation on https://docs.mendix.com and the learnings on https://gettingstarted.mendixcloud.com/link/path.

In your case you need some logic in your import. How do you import your data? If you do this via API's and you use import mappings, you can specify how objects are linked and which associations need to be set. See here some documentation: https://docs.mendix.com/refguide/import-mappings

If you use the excel importer: see the documentation of the module: https://appstore.home.mendix.com/link/app/72/

answered