Well, If you're deleting from a list you want to be iterating backwards. If you're on UniVerse you want to be using field not value level (for hint mechanism) or use revremove. It assumes LAST.NAME is not empty.
Since I don't know your data I do know if using index will stuff it if is not a unique part of a field, or if it more efficient to build a new key list or take from the current (are there more deleted than kept?) You can use the new (ugly, ugly but potentially useful) U2 Dynamic Objects to make a dictionary structure to ensure uniqueness.. Brian -----Original Message----- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson Sent: 12 July 2012 01:10 To: u2-users@listserver.u2ug.org Subject: [U2] trimming a list (a test of your ability) 1295 FOR DISPLAY.LOOP = 1 TO KEY.COUNT 1296 UTILITY.ID = KEY.LIST<1,DISPLAY.LOOP> 1297 GOSUB GET.UTILITY.RECORD 1298 IF INDEX(UTILITY.NAME,LAST.NAME,1) = 0 THEN 1299 KEY.LIST = DELETE(KEY.LIST,1,DISPLAY.LOOP,0) 1300 DISPLAY.LOOP -= 1 1301 KEY.COUNT -= 1 1302 END 1303 NEXT DISPLAY.LOOP Comments? _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users