Posted: 4 Mar 2015 8:55 EST Last activity: 17 Jul 2017 15:57 EDT
What exactly is the difference between Copy From and Refer To a Data Page?
In our app, we have a Page List Property that's populated by a Data Page. I've noticed the two options 'Refer to a Data Page' and 'Copy From a Data Page' have the following descriptions:
When the parameter values being passed to the data page change and a non-parameter value is referenced, a new data page is loaded and copied into this property. Interactions with the property happen on the copied data.
When data page parameters change and reference to a non-parameter value is made, the system loads a new data page. Reads from and writes to the property occur on the new data page.
I've been scratching my head to understand what exactly is going on here. What does the description mean by parameter and non-parameter values? The description of Refer To seems to me like it's just creating a new Data Page and copying in data... which I'd assume Copy To is supposed to do.
Any clarifications around this would be super helpful.
***Updated by moderator: Marissa to close post***
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
Copy From will copy the entire contents of the data page (be it List or Single Object) into the property. You case will contain the entire structure, which is good for keep track of historical data that belongs with the case.
Refer To will not store the data loaded on the data page with your work object. The property essentially acts like a pointer to the data page. When the work object is closed, nothing is stored potentially the parameter values are stored, if you check that box, if memory serves me). Every time you re-open the work object and reference that property, it will look to the data page for the data, meaning that the data could change (an example of this might be CustomerInfo that is stored in another data base. Pega may not be the system of record - we may just be showing this data on the screen as part of the work we are doing. No need to store the entire customer record, instead we can load it as needed. This is where "Live Data" comes from).
Thanks for the answer (and sorry for my late reply)! I just have a couple follow up questions around Refer To....
When you say that "Refer To will not store the data loaded on the date page with your work object," where exactly is this data being stored? I thought that if I make updates to my work object that these updates should be written to the data base at some point?
If you could help explain this situation, explaining how the property is populated with both Refer To and Copy From I think it'll clear things up for me.. - You have a Work Object with a Property who is populated by a Data Page
1) User A opens their Assignment the Work Object 2) User A edits the Work Object's Property that's populated by the data page 3) User A submits the Work Object, completing their assignment
4) User B opens their own separate Assignment on the same Work Object
I've gone through this situation with the same work object, with Refer To and Copy From set and have seen the property populated in different ways. I'm hoping that understanding the process will help me understand the use of each setting.
If you need to save the state of the property / allow modifications to it, you will want to do a "Copy From". Otherwise you would need to make the data page that is loading the property be Editable, and come up with a mechanism to save the changes back to the property.
Refer To simply points that property to a data page. If the Data Page is read-only, you won't be able to make any modifications to the the property (or at least you shouldn't be able to).
Copy From simply looks at that data page, and copies it into the property, meaning you can do whatever you want, and it will be saved with the work object.
I recently came across this discussion and have an interesting point to discuss. I have a Node level data page which I use to auto populate a pagelist. I have enabled the keyed access (I pass in a property reference as one of the keys to filter the list) and do a Copy From action as explained above. However what I have noticed (intermittently) that the entire data page (list) is not getting filtered by the key that I provide. Also sometimes the resulting filtered list is having values which do not correspond to the key that has been passed to it. Has it got anything to do with me choosing Copy From vs the Refer To option?
since this doesn't happen always, its difficult to point out a reason behind this. Does the filtering (in case of Copy From) happens after all the results from the data page is loaded into the pagelist?
Can there be any contention that can happen in case parallel requestors (agents) are trying to execute the same piece of code at the same time?