How to populate a composite field using a attribute from a parent entity
Dear Mendix Community, I have a Parent-Child (One to Many) relation of two entities, Article and Sub Article. When creating a SubArtikel record, the SubArtikelCode need to be stored, which is a composition of the ArtikelCode field from its parent and the SubArtikelNumber field that is entered by the user. However I am really puzzled how I can populate this composite field. Does anyone have a suggestion how I can do this? Find below some more information. You help is much appreciated. Article Entity ArtikelNummer ArtikelTitel 5 Artikel A SubArtikel Entity SubArtikelNummer SubArticleCode SubArticleTitel 1 5.1 Sub Article X 2 5.2 Sub Article Y 3 5.3 Sub Article Z I thought of using a Microflow that would execute in de Page Sub_Artikel_NewEdit, to concatenate the two field. However Mendix does not allow to pass-on the parent Artikel into the Microflow. The error message returned is “Parameter 'Artikel' of the selected microflow does not match available arguments.” The Argument is not available for the action button. I need to store this SubArtikelCode as I need to reference to it in the data import.
Got it! The solution was to do Retrieve a list of Artikel by Association $sub/SubArtikel_Artikel over. Then I could create a String Variable and include a Change Object to set the field to the created string value.