how to add string lists

Hi,Please can you say how to add two string list and store that result in string list.each string has five elements and how to add document list also ?

Hi Vannur,

1.WmPublic/pub.list:appendToStringList
Map the Stringlist1 to toList serviceIn parameter and stringList2 map to fromList then serviceOut parameter toList parameter contains the both values.

do the same proceess for documentList also
2.WmPublic/pub.list:appendToDocumentList

Hi jeevan,sorry because I did not explain briefly,I want add two stringlist values as per their array position,i.e I expect as per below type,please can you say alternate way…

sl1[0]=10; sl2[0]=10; output string list sout[0]=20;
sl1[1]=20; sl2[1]=20; sout[1]=40;
sl1[2]=30; sl2[2]=30; sout[2]=60;
sl1[3]=40: sl2[3]=40; sout[3]=80;
sl1[4]=50; sl2[4]=50; sout[4]=100;

one way to achive it:

inputListA
InputListB

OutputList

Loop over inputListA (with no output array)
{
$Iteration = IterationA
Loop over InputListB (with output array as OutputList)
{
$Iteration = IterationB
If (IterationA=IterationB) —Implement with branch
{
a+b = tempout – (Use pub.math.addInts)
appendtoStringList/DocumentList (append tempout value in from item and constiture your outputList)
}
}

– Hope its simple n understandable, let me know if you got qustions :stuck_out_tongue:

cheers!
nD

In my opinion, your best bet would be to probably do it in Java. Here’s sample code for a Java service that takes two String Lists, a and b, and outputs c. NOTE: the code assumes b is the same length as a.

Now if you want to stick with Flow, you can do something similar with three simple steps. Suppose the service takes the same inputs, a and b, and outputs c:

That’s it!

Good luck,
Percio