Posted: 28 Jul 2015 21:36 EDT Last activity: 15 Mar 2016 7:22 EDT
How to create a CSV file of records that user selected from Repeating Grid
My customer's requirement is for user to be able to download a CSV file from repeating grid. Say, we have a screen of list of work objects. Each row has a checkbox where user can select to export. When user clicks the export button, PRPC creates CSV file internally and pops up a window so user can either save in his local or open the file. I know how to do this in excel, using the OOTB "pzRDExportWrapper" activity, but this activity can make either excel or PDF and it does not support CSV format. Are there any handy OOTB facilities that we could use to meet this requirement?
I have attached the screenshot of what we are trying to achieve.
This activity worked well. Thanks for your advise.
Just for information - I also faced characterset issue: our client wants CSV file in Shift JIS, that is one of the most common characterset used in Japan. Since PRPC is based upon Java and this activity generates CSV file in the defaulted UTF-8. Unfortunately, this "pxConvertResultsToCSV" activity is Final and there is no customization allowed so I had to rename it but in the Java step I changed the parameter for PRWriter constructor specifying "SJIS" from null (This is equivalent as UTF-8) and it worked. I have attached how to do it for someone who may encounter the same issue in the future.
This means we have to enhance the Java step to add Byte Order Mark at the start of the exported CSV file even if we are exporting them in UTF-8 format to support CSV files containing non-ASCII characters, since it is more likely the end users will view those exported CSV files in Excel, instead of a Text editor.
It is really appreciated if you can move this discussion thread to Pega Product Support, where non-pega employee members can access the contents as well, hence it can be referred further in other open spaces.
If the garbage still contains some traits to allow us figure out its origin, for example in the case you have mentioned, perhaps it is still possible to reproduce the original characters. But if the garbage only contains partial DNA information, then reproduced one is a new monster I guess