Copying one record list to another

Copying one record list to another

  
how do you copy record list X onto the end of an existing record list Y?

Note:  record list Y contains existing records, and should not be overwritten by record list X.

One solution, is to use "ListAppend" function and do a loop, copying one record at a time from record list X into record list Y. But how would you get the max record count of record list X? (ie so that it could be used to perform a loop)
Hi Robert,

If you have a Record List, you can use a For Each loop, and copy the Current record from list X to Y. I'm not sure why you would need the count of record list X - you do not need to access each Record List item by its index.

Also, if I am not mistaken, you can get the count of a Record List by checking its Length property.

Regards,

Paulo Tavares
Robert,

Take a look at ListUtils, I think it might have what you need - http://www.outsystems.com/NetworkSolutions/ProjectDetail.aspx?ProjectId=162

Best regards,
Goncalo
Hi Robert,

I see that you already have your answers. I would just like to add that  it might also be interesting to read the Record List data type and actions description and the Record List Runtime Properties explanation .

Another subject that can be useful is how you can do direct indexing in Record Lists using and expressions like MyList[index].

Kind Regards,

Daniel Lourenço
OutSystems