Refreshing data of a object in a MF and loop

0
We are importing data in csv format using the Flat File Integrator. Some rows in that file are incomplete. So we have defined a Queue and 2 Interface Defnitions. As the user can select the file for import, during the mport proces the system has to update the Queue Defnition with the chosen file name and reset the Process attribute. As there are 2 Interface Definitions this update has to e done twice as the Queue efinition is updated during the process using the first Interface Definition. In short the MF should be something like this: 1) Retrieve the Queue Definition (ObjectA) 2) Set the chosen file name 3) Retrieve the Interface Definitions linked to that Queue Definition (ListA) 4) Loop:    a) reset Process attribute to flase and commit    b) Call the MF to process the file and import the data; in this MF the Queue Definition is updated (Process attribute is set to true) and committed    c) retrieve the Queue Definition again (ObjectA) and back to step 4a). In ths way the process will work through all Import Definitions related to the Queue Definition In short we want a refrsh of my ObjectA. But we cannot use the same object name when retrieving that object in a loop. Then Mendix require a different object name. Even though it is the same instance of the bjectentity, share the same data and can share thesame memory. Is there a simple solution to update/refresh the same object/entitiy multiple times in a MF with the processing in a loop?  
asked
2 answers
1

If i understand your problem correctly, you could try to match the "id" of the object in the query. In the database retrieve you can match on the attribute id. Example constraint: "[id = $iteratorObject]"

answered
0

Made an error in the flow of the programme. have corrected it in my OP.

The CSV file can contain incomplete entries, but all data should be imported. Therefore we have to define multiple Interface Definitions. Hence a list of those Definitions (being 1 to more, depending on the import) to process that CSV file and get all entries imported.

We do not want to retrieve the iterator object (Interface Definition) but the Queue Definition. It can only be procesed once officially (attribute Process = true), but in this loop we may need it multiple times, as the Queue Definition contains the file name to be processed.

The problem is you cannot use the same object name in Mendix when retrieving the same object, while that should not be the problem.

answered