Upload a CSV file into Pega PE V851 and capture the data from it to the UI screen
Today I have done a simple exercise on how we can capture the CSV file data on to Pega UI screen after uploading the records on the Clipboard using OOTB activity rule.
Here is the simple screen on how I brought the CSV data.
The customer specific CSV file contains 3 rows and 3 cols of data and the col headers must match with the properties defined in Pega. In my case, the properties are created with names: CustID, CustName and CustAddress and the details of these properties are shown below. To upload the file, I have used OOTB control:FilePath and set the property:pyFileName under pyWorkPage. For this controlr, we need to check the checkbox "SetEncodingNow".
Now it is the time to build the logic after clicking the Upload button. Called a simple activity with Refresh Section in the Click event. This activity has 2 simple steps and the snapshot of it is given below. From this step, we can add as much as logic we want. But for now I added a simple exception handling scenario and an OOTB activity call to upload the CSV records on the Clipboard using the PageList property mentioned above. Once the data comes on the Clipboard, the records can be shown on the Table after screen refresh done.
Bottom line - Though this is a simple exercise for us but the main key for this whole exercise is to understand the existing OOTB activity for the entire exercise :) :)
Reference:
1) Pega Community Site
2) Developer Help





