Quantcast
Channel: Mendix Forum Questions
Viewing all articles
Browse latest Browse all 83468

Updating list to iterate while iterating

$
0
0

Hi guys,

I've got this list of non-persistable objects which contains duplicates. The id of the object is different, but the attribute value is the same.
Goal: I want to create a list without any duplicates in attribute value.
So, what I'm doing right now is iterate over the list. For every object, I filter the original list on attribute value. If a duplicate is found, I remove it from the list to iterate over and delete it.
Problem: I see the number of objects in the original list decreasing, but the loop still iterates over the objects I removed and deleted. It seems the loop has a list in cache that doesn't respond to list-actions within the loop.

Is there another way to do this?

Thanks!


Viewing all articles
Browse latest Browse all 83468

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>