How to add to a list?

In a loop, I test various values and depending on those values I want to add an item to either ListA or ListB.   The question I have is how I can add/append an item (for example, file name as a text string) to a variable/list?

********

FileList = file1.txt, file2.txt, file3.txt, file4.txt, file5.txt

Iterate FileList

      If file is of 'this type' then add NextFilename to ListA

      Else add NextFilename to ListB

********

So, at the end of the iteration, ListA and ListB might look something like...

ListA: file1.txt, file3.txt

ListB: file2.txt, file4.txt, file5.txt

I will then write actions to process ListA and ListB separately as variables that I can use with the List Iterator action.   I am just stuck on how to append items to a list.   Suggestions please?

Clive

 

 

Hi Clive,

There’s an Append To Variable action which should do exactly what you need. :).

Regards,

Angus