Newline characters added to Single Value attribute fields Hot

by Darren McLaughlin on April 17, 2017

It is currently possible to add newline characters to Single Value attribute fields, which can cause problems.

  • This can at least (1) skew the output of browse templates that assume this is a single line of text and (2) corrupt the displayed CSV output of a report in the Web Client. To reproduce this, type a line of text in Notepad, then hit a couple of times. Select the text just entered by putting the cursor at the beginning of the text, holding down the key, and moving the cursor to the next line. This will select the text plus the newline. CTRL-C to copy the text, then CTRL-V to paste the text into the Single Value attribute field. Save it. Use "Browse" to look at the request. The field will probably be duplicated (unless the template takes into account the possibility this could be multiple lines). Display the CSV formatted report in the Web Client. You'll have CSV data that is broken over two (or more) lines which can't be imported into Excel without having to manually fix the extra line.

    I haven't tried it, but it may be possible to enter a newline directorly by pressing the key.

    Given that Single Value fields are allowed in reports in the Web Client plus displayed in the CSV format of these reports, it seems reasonable to conclude that a Single Value attribute is intended to be a single line of text. Therefore, additional coding should be added to enforce this and ensure any data entered into a Single Value attribute field is in fact a single line of text.  This will prevent problems cause by this up front instead of waiting until a report does not work correctly.

  • Please login to view any attachments.

  • There are no user comments for this idea.