WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

How To
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Get Unique Records in a List


Question:

Does anyone know if there is a way to only return Unique records from a string. I have a string that is tab delimited eg string = strcat("a", @tab, "b", @tab, "c", @tab, "a", @tab, "l")

Answer:


#definefunction ItemListUnique(list, delimiter)
for i = ItemCount(list,delimiter) to 1 by -1
if ItemLocate(ItemExtract(i, list, delimiter ),list, delimiter) != i
list = ItemRemove(i,list,delimiter)
endif
next
return list
#endfunction

Article ID:   W17003
File Created: 2007:07:03:14:27:32
Last Updated: 2007:07:03:14:27:32