I have a datatable which I use as a work queue. This datatable contains user IDs (io_dtInactiveUsers). However, some user IDs are supposed to be excluded from processing in the work queue. These user IDs which are supposed to be excluded can be found in a second datatable (dtExclusion).
The way I have built my automation is that for each row in io_dtInactiveUsers, I check if the user ID matches any of the rows in dtExclusion. If it does, then it sets the a boolean variable to True. This will remove the data row in io_dtInactiveUsers. Please see workflow attached in picture below:
However, I get the following error message:
“For Each Row: Collection was modified; enumeration operation might not execute.”
I suspect the datatable does not like to be adjusted with while it’s still looping.
The forum topics I have found so far have only been able to delete rows if they are some specific value. Would therefore be very glad if I would receive some help to remove the rows if it matches any of the values in the second datatable.