Question
Merkle Inc
GB
Last activity: 15 Apr 2019 15:30 EDT
Copy Data from one pagelist to another pagelist using Loop
Hi,
I'm trying to iterate through a pagelist (MyList.ThisList()), where ThisList can have multiple pages, but has a minimum of 1. I use Page-Copy in an activity and want to copy it. CopyFrom is: MyList.ThisList(<CURRENT>) and I want it to copy the page if it exists so it looks like this in the end:
MyList.ThisList(1) copy into NewList(1)
MyList.ThisList(2) copy into NewList(2)
etc.
Loop condition is "For each embedded page".
How does the activity create a new entry for each entry in ThisList?
Thanks!
Are you copying from MyList.ThisList(1) to NewList(1)? Its better to define NewList.pxResults in pages and classes tab with Code-Pega-List as class. When the activity runs, if ThisList has any embedded pages in it, it will be copied to NewList. There will be a separate pagelist created with a name NewList in clipboard with NewList.pxRrsults(Index) containing the copied pages.
Hope it helps