Remove dulicated from documentlist

Hi,
I need some pointer on the best way to remove the duplicate records from the documentlist. The document list is having about 3000 documents. I can do this with the help of some loop but it seems not to be a good idea as far as performance is concern.

Please Advice.

Thanks
Rameshwaram

Rameshwaram

I think using .,… recordList to record, or recordListToTable would be a good option becos, these services works on Key values so that u can eliminate the dupilcates…Do some R&D on them…

Please let me know if this helps…!!!

Thanks
Rakesh

There is a sort method in com.wm.data.IDataUtil
IData sortIDataArrayByKey(IData dataArray, String key, int compareType, boolean descending)

If there is a specific key who’s value means the documents are the same, you can sort and then do a loop through adding the unique documents to a real List object and then convert that List to an IData (i.e. a documentList).

See WmSamples sample.complexMapping.largeDoc.messageBuilder:createList, addToList, listToArray for methods that implement a real List (vector) object.

HTH,
Fred