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!
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
JLL
IN
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
Merkle Inc
GB
Thanks for your reply. This does not solve the problem. I need ThisList(1) to be copied to the level MyList.ThisList to have it available to test it for example in a when-rule which is at the level MyList.ThisList. If that makes sense?
JLL
IN
So you mean ThisList(1) should be copied to MyList.ThisList
Is MyList.ThisList a pagelist property ?
Can you please give screenshot of the activity rule in which you are trying to achieve page-copy.
Merkle Inc
GB
I just realised I might have described the problem incorrectly.
We have a class MyList which is top-level and contains the property ThisListS (which is a pagelist property). I now want to copy ThisListS to another class, called ThisList using a page called NewList.
Please see attached screenshots.
-
Sangeetha B Chandan Kumar Ram tanveer ahmad Alexander Nazarov ROOBINI R R and 7 More
Pegasystems Inc.
US
Hi Michael,
Its little confusing with your requirement, but if i understand correctly you want to copy the Page list property content across different classes. Let's say you have SourceList page list property in ClassA and you want to copy the content of this page list property into DestinationList page list property available in ClassB, then please go through my use case which has been created to demonstrate the above requirement.
Hope that's what you're looking for, if not do let me know your exact requirement to help your further.
Regards,
Mahesh M
Merkle Inc
GB
Hi Mahesh,
that's exactly what I want to do. And I believe your use case pretty closely matches my requirements. However, when following it and running the activity, it results in a time out at some point. Due to client requirements, SourceList is defined as manual.
Another solution I was thinking of was instead of copying the pageList into a new PageList, to copy it as a new page. So SourceList(1) in Class A will be DestinationPage1 in Class B
SourceList(2) will be DestinationPage2
SourceList(3) will be DestinationPage3
Is it possible to do this with a loop?
Pegasystems Inc.
US
However, when following it and running the activity, it results in a time out at some point. -> Is your data huge? because i don't think you should get the timeout while copying the data from one source page list to destination page list.
Due to client requirements, SourceList is defined as manual. -> Need to understand how you are sourcing the data to Source page list property if you define it as Manual and also the page list content is available during the time of copying from source to destination?
So SourceList(1) in Class A will be DestinationPage1 in Class B -> I dint understand what you are trying to achieve, SourceList(1) is the first page available in the SourceList property and where are you storing the DestinationPage1 in Class B?