Hi, I have just taken part in the latest Mendix rapid developer training and am try to put my new skills to use but I have got suck. I have created an entity in my domain model. One of the attributes of this entity is call NewUpdate. I have used the excel importer module to be able import data into this entity where the NewUpdate value has a default value of New. What I want to do is prior to the import set all of rows which currently say New to say Update. I created a microflow and tried to retrieve an object but if I do that then I cannot select the object inside the change object but if I use create object which means that I can select it inside of the change object then it just adds a new row to the table. What I really need is a for each loop where I can say for each object in the table that has a NewUpdate value of New then set to Update. I have spent the last few ours looking on the fourms and google but I cant find a solution. I know its probably a really simple one but I cam suck. Any help would be appreciated. Thanks
I would do this with a custom retrieve action like this
I use limit and offsets because if there are a couple of thousend records your server will run out of memory. This way you proces the entity in batches. Once you have this list you can iterate over the list and change the attribute. Do not commit inside the iteration. It is more efficient to do it outside of the iteration and just commit the list.
You also need to do acount of the list. If that count is the same as your limit you have not yet processed all records and you not to change your offset and add the limit value to the offset value and do the retrieve again.