how to get a value from a list in axapta

I declared a List named list:

list = global::strSplit(prevSecondaryFocus, limiter);

it has a value <“A001”,“M1”>

What I want is to get the A001 and store it in a variable and M1 to another variable.

please help me I dont know how to get a value from a list.


HI Leaan,

Try this

static void List_Example(Args _args)
List list = new List(Types::String);
container packedList;
ListIterator iterator;
str first,second;


iterator = new ListIterator(list);
packedList += iterator.value();;

first = conpeek(packedList,1);
second = conpeek(packedList,2);

print first;
print second;

Naresh Kolli

hie naresh can u pls help me with dis?

thank you!!