Upload CSV File on UI from Data-Portal and then parse the CSV Records
I have a requirement where,
User will upload a CSV file from section in Data-Portal class.
Then the uploaded CSV file is parsed to number of rows present in it.
What approach should i follow. I did not found any OOB feature which can help.
I tried using pzMultiFilePath control for uploading CSV and then i am not able to understand how will i parse the file in Post Processing as file content are in encoded form in property dragDropFileUpload.pxResults(1).pyFileSource.
Also i tried to store file on server at specified location while uploading on UI and then use Service-File Listener to parse the file. But i do not know how in Pega i can achieve from UI to upload file at a specified location on server.
Let me know if any one has any ideas how can i proceed.
I do have the same requirement. Can you help me with detail steps on how to achieve this. I am able to see the results in the list but i want to store the results in to pxResults of list property so that i can bind it to RepeatGrid. I have implemented like below.
1. on click of button, called a local action - UploadCSVResults. In the Flow Action(UploadCSVResults), i have called "pxUploadCSVResults" section.
2. In the post processing, i have called an activity inside which i called the activity "pxUploadCSVResults" in one step.
With this i am able to see the results in list property, but it is not as expected.
Ex : I have a page list in work type. Let's say, work type is PurchaseRequest and page list is ItemList, with class of MyCo-MyApp-Data-Item. In this data class, we have ItemID, ItemName, and ItemHowMany, and ItemPrice. And we have a CSV file that will look like:
With the above approach i am getting the output as
I want to store the results to pxResults of list property. I tried to pass the step page while calling the "pxUploadCSVResults" activity inside the activity by specifying the pages&classes as ItemList - Code-Pega-List and ItemList.pxResults - MyCo-MyApp-Data-Item. But somehow it didn't work.
Appreciate if you can help me with the steps if you achieved this functionality.
When we have pagelist property then pega will form the structure as itemlist(1) format. I am not sure why you need pxResults structure pxResults format generally will be used on toplevel pages or data pages. If you need pyworkpage.itemlist.pxresults then may be you can try passing parameters to activity as pagename should be pyworkpage.itemlist(Itemlist is page property in work class) and .pxResults as pagelist.