Question
How Can We Upload And Attach A Excel File
Hello All,
I have an requirement where I need to read an excel file. Hence, I have given the user the Work-.pyFilePath control where user will get the browse button where he can browse and select a file.
The pxRequestor.pyFileUpload (Code-Pega-Requestor) will be holding the file name.
I am using the OOTB activity @baseclass.MSOParseExcelFile to parse the excel sheet and read the data into my pega properties. I have uploaded a template for the same.
Now business requests to attach the same file to the work object.
So, when I analyze, I am not able to user any OOTB activities which will be used to attach a file to the work object because all these activities users Data-WorkAttach-XXX page on the UI to hold the attachment.
But my UI has the pyFilePath on pyWorkPage.
So how can I attach a file and at the same time reads the content, parse the data using the binary file template and map the data to my pega properties?
Please help me in this.
Hi
I think you can try to implement the logic in three parts
1. Upload the excel and let system parse it to get the data
2. Store the uploaded excel in some server location
3. Use another activity to pick the excel and attach to the workobject ( Refer : https://pdn.pega.com/how-create-activities-attach-files-work-objects)