How to retrivew values from list

0
Hi All, I have created a list by splitting a string using split string java action. How to retrieve/get values from the list (based on index) .
asked
1 answers
1

Assuming that you created the java action:

In the java action loop through the list and create records in a non persistent entity.

Add these records in a list of IMendixObjects or more a more specific list  and make sure the java action returns the list to the microflow.

 

Using the splitString java action from community commons returns a list of SplitItems. These can be used in a loop like in the pseudo flow  depicted below:

In this flow the first activity creates a delimited string (A;B;C) then the second action split this sting into SpitItems and returns a list of these. This list can be used as the input for a loop activity and then each item can be used via the iterator variable like $IteratorSplitItem/Value or $IteratorSplitItem/Index to get to the value in the string or when using a list operation to find the item on the second position in the string perform a find via the index value (probably a zero-indexed function, so position 1 == index 0).

answered