Add attribute to entity from another entity

i have a microflow that pulls data from mysql and adds it to the mendix database. it also loops over to see if it exists first. i have an entity called credit memos and another called invoices. they have the same attribute but with different names (not ideal but that’s what i have to work with). example: invoices/docID = creditmemos/invoiceNumber. i added an extra attribute in the credit memo entity to hold this invoice number but unsure how to fill in the correct data.       does anyone have any idea on how i can achieve this? thanks!
1 answers

Hi Corina,


If you are trying to fill in the Invoices Entity from the MySql Credit Memo data, if the object found with same Invoice Number in your check Credit exists:

True > You already retrieved Credit Memo and do another retrieve of Invoices via association  and make changes as needed


False > Create a New Credit Memo and also create Invoices add association between them. 


For both Credit Memos and Invoices, you need to create a list before loop (Like you did for credit memo) and commit outside the loop.