Data import fails when fields contain CR/LF chars
Unable to use the Data Explorer Load feature (data import from a file). The log file displays a java.lang.StringIndexOutOfBoundsException. A dialog box on the screen displays 'Uploading...', and then clears the input file name.
No error on the UI side. Importing a file failed; the log file showed a java.lang.StringIndexOutOfBoundsException. On the end user side, the dialog box says briefly 'Uploading...' and then clears the input file name.
STEPS T REPRODUCE
Go to Data Explorer.
Create a new data type if necessary.
Click Records tab.
Click Actions > Import.
Load a CSV file similar to the attached example.
A defect in Pegasystems’ code or rules. If there is a new line character within the CSV fields, while importing the file, these new line characters are treated incorrectly and parsed as if it's the end of a row in CSV.
Apply HFix-24318. The fields containing new line characters will be enclosed in double quotes while exporting. While importing, parsing logic is changed to handle new line characters within the fields.
Published January 31, 2016 - Updated October 8, 2020