Activity/Data Transform to check if pagelists match then transfer data between them
I have a requirement to build a grid that shows the required attached documents for a case and if they have been uploaded yet or not. The properties in this list of required documents change based on user inputs/attached documents, so I created a page list property named Required Documents that lists the names, categories, deadlines and such for the documents. I also created an Uploaded Documents page list property that references the D_AttachmentList data page (shows what files have been uploaded). I now need to build an activity/data transform that does these things:
1. Iterates through the requirements document list
2. In each iteration, check if that document has been uploaded yet (by iterating through the uploaded documents list).
3. If the document has been uploaded, copy that document data from the uploaded documents list to the requirements document list.
I know that I could do this with a data transform and a bunch of when rules (for each requirements document in the list, check a when rule to see if it has an uploaded document, if the when rule is true then copy the data from the entry on the data page to that page of the requirements document), but I feel like there is a more efficent way to do this. Does anyone have any experience/ideas?
Instead of having two lists, why don't you update the required documents list when documents are uploaded. You could have few properties to track the status of the document and its content. This way you don't have to worry about this merge logic and would have a single list you could display.
I am now just trying to use the Embed-Attach-File property to link each page of the page list to the attachments. If anyone has any experience with this let me know! Currently it is not able create the attachment link even though all the parameters are correct (uses the activity pyGetAttachmentFieldInfo). I think the problem is the AttachmentFieldName property. I believe it must reference the file name of the uploaded document, which seems impossible to predict so I am lost as to how to create a link. The property page is in the screenshot below.
I am using Pega 7.2.1, and it is a brand new implementation. At this point all I need is to get the Required Documents list to have a link to the uploaded document of that attachment category so that I can add a link to the grid that displays the required documents. Currently I have a modal dialog that pops out when you click on the Document Name in the grid, and this modal dialog shows a grid of D_AttachmentsByCategory (I pass in the Required Document category as a parameter) so you can view and download attachments of that category. I wish I could just have a column of document links in the grid though.