PDA

View Full Version : Manipulating StringList plzz HELP !


scoobydoo
03-14-2006, 15:08
Hello WmPeople !
I have a stringlist as an output from a service.
And lets assume the list has

Car.
Truck.
SUV.

i want to get rid of SUV in the string list.
Ive gown dferent roads to get this issue solved...but my logic keeps failing.
Someone please help
Thanks
Scooby !

jaya0313
03-14-2006, 15:11
Check for that particular item when you are adding it to the string list and drop it.

scoobydoo
03-14-2006, 15:23
Jaya,
Its a builtin service that generates the stringlist.
I cannot just drop it !
Any other suggestions wmpeople?

scoobydoo
03-14-2006, 15:26
I need to go through that string list , remove the unwanted string and put all the strings back into a new string list!

tillmanm
03-14-2006, 16:00
Can you loop through stringList, branch and appendToStringList (newStringList) if %stringList% != 'SUV'?

jaya0313
03-14-2006, 16:12
create a java service

bash
03-15-2006, 01:42
Yes of course, you can loop through the string list, branch , and then build a new string list without the unwanted ones.

All lists can be looped !!!
HTH
Regards
Bhavani

srikanth05
03-15-2006, 10:27
hi,
ok so u getting a string list as output from a service.u loop over the string list and check for the item u want to delete u can do string comparison .
and in every iteration add the element to new string list if its not the value u want to delete.and if u find the value u want u to delete then do nothing continue looping(dont add to new string list).
hope this helps.
sri

scoobydoo
03-15-2006, 10:40
Bash,jaya0313,tillmanm;
You guys rock !
I got it baby !
Yes I got it....my brains just needed a jump!
thanks
Scoooooooobydoo !

scoobydoo
03-15-2006, 10:42
I did it exactly what u said srikanth05!
thanks amigo !
Gracias !
thanks everyone!
ya'll are life savers!
scoobydoo

jaya0313
03-15-2006, 10:42
can you tell us how you solved it

scoobydoo
03-15-2006, 11:18
Jaya
i looped over the car types,
branch over the expressions in sequences
and if the stringlist equals SUV do nothing
and if its not simply appendtostringlist
before that i was simple mapping........yes i know its stupid.....i was smokin something !
but thanks ya'll !