For example you provided range from 100 to 110 and want both start and end value in some variable then you can use container to split range values.
static void GetSplitValuesFromRange(Args _args)
{
str range;
str startValue,endValue;
List ledgerRange = new list(Types::String);
ListIterator listIterator;
container con;
range = "100...101";
ledgerRange = strSplit(range,"..");
listiterator = new listiterator(ledgerRange);
while(listiterator.more())
{
con += listiterator.value();
listiterator.next();
}
startValue = conpeek(con,1);
endValue = conPeek(con,4);
info(EndValue);
}
static void GetSplitValuesFromRange(Args _args)
{
str range;
str startValue,endValue;
List ledgerRange = new list(Types::String);
ListIterator listIterator;
container con;
range = "100...101";
ledgerRange = strSplit(range,"..");
listiterator = new listiterator(ledgerRange);
while(listiterator.more())
{
con += listiterator.value();
listiterator.next();
}
startValue = conpeek(con,1);
endValue = conPeek(con,4);
info(EndValue);
}
No comments:
Post a Comment