Hey guys,
I've got a dataview (shown below)...
UDP Position Label Number
11042266 1 JXXXXX 9XXXXXXXXXXX
11042266 2 GXXXXX 9XXXXXXXXXXX
11042449 1 RXXXXX 11042458
11042458 1 SXXXXX 9XXXXXXXXXXX
11042458 2 IXXXXX 9XXXXXXXXXXX
11042458 4 AXXXXX 9XXXXXXXXXXX
11042458 5 HXXXXX 9XXXXXXXXXXX
11042458 6 MXXXXX 9XXXXXXXXXXX
11042459 1 IXXXXX 9XXXXXXXXXXX
11042459 2 SXXXXX 9XXXXXXXXXXX
you can see in the first column there is a field called UDP which has duplicates ...
what i need to end up with is a collection... probably an arraylist of comma seperated strings in the format...
UDP,Label,Number
but adds the fields Label and Number from the duplicates onto the string in the order of the position field: -
so the first UDP should show like this:
11042266,JXXXXXX,9XXXXXXXXXXX,GXXXXX,9XXXXXXXXXXX
the 2nd should be:
11042449,RXXXXXX,11042458
the 3rd should be:
11042458,SXXXXX,9XXXXXXXXXXX,IXXXXX,9XXXXXXXXXXX,AXXXXXX,9XXXXXXXXXXX,HXXXXXX,9XXXXXXXXXXX,MXXXXXX,9XXXXXXXXXXX
the 4th:
11042159,IXXXXXX,9XXXXXXXXXXX,SXXXXXX,9XXXXXXXXXXX
Hope this makes sense..
i've been trying do do it using loops but am running into difficulty...
Any advice greatly appreciated!