String lists and record lists are implemented as Java arrays. There is no exposed service to remove an item from the array and then collapse the array down.
Dropping the array element within the loop has no effect on the array itself. Looping “overloads” the use of the array name and uses it as the element name while inside the loop. Thus, if you have a list named “foo” and loop over it, the array element reference is also named “foo”. Dropping “foo” only drops the loop’s reference to the element and does not touch the array itself. (Hope this is presented coherently.)
Here is another case where it might help to think of the loop in terms of Java: if you had an array of objects that you looped over, you probably wouldn’t even think of trying to remove them from the array. You’d probably create another array either of the processed items or the non-processed items. That’s probably the approach you need to take in this instance.
HTH
#webMethods#Flow-and-Java-services#Integration-Server-and-ESB