Posted: 2 Jun 2015 5:12 EDT Last activity: 9 Jun 2015 11:21 EDT
Attachments and Attachment Category
We have a requirement to upload docs (of any type) from user's local desktop and to save those to Work object.
1) A screen which will have sub sections of individual doc type. For example, marketing material, Requirement material etc
2) User can upload multiple docs under each sub section. Each entry in that sub section will have a "Browse" button, "Cross" mark to delete the attachment and "Add" button underneath to add another attachment.
1) Saved the OOTB flow action rule Work-.AttachAFile into our application rule set and included a section that will have individual sub sections based on doc type (Refer point 1 above)
2) Configure OOTB button for "Browse" and Refer control "FilePath" in the control cell and "pxAttachName" for file name in the Property cell.
3) Included this section within a repeating row page list with Code-Pega-List with each entry being of type "Link-Attachment"
4) When we run the flow and test this, a page is creatd for each attachment that we add. However the poperty "pxAttachName", Path from where the file is uploaded, Document type are not getting populated in any py- or px- properties in the clipboard. We need file name, file path, file type other than file uploaded operator iD, Name of the user.
Can anyone please throw some light on this as to how to achieve this? Also to save the attachments to that work object, we are calling OOTB rule Work-.saveAllAttachments from the post processing activity of Work-.AttachAFile flow action rule.
Your requirement of allowing multiple attachments from the same screen will not be possible by Using the OOTB FilePath control. That is designed to be used for one File browse at a time.
Which version of PRPC are you using as the latest 7.1.7 has a new UI for AttachAFile FlowAction which might be good for you use case.
Meanwhile in you current system try doing the following and see if your use-case gets solved:
1. Have multiple subsections for each of your categories which displays the list of Files(This is needs to be a page that contains the File list)
2. Add one Browse button on the top along with a Dropdown of Caegories list. Have an Add button which uploads the browsed file and adds to the list of selected category. Refresh the complete section to show the uploaded file.
3. Now once all the Files are uploaded allow the user to click a submit button at the bottom which can iterate over all the categories list and invoke SaveAllAttachments and make sure all the attachments are attached.