ox-it / ords

Automatically exported from code.google.com/p/ords
0 stars 0 forks source link

Can't add line breaks within fields #793

Open MerielP opened 8 years ago

MerielP commented 8 years ago

There currently seems to be no way of adding line breaks within a single ORDS field. This means that one cannot have a piece of text with multiple paragraphs - they'll be concatenated to form a single para.

Using \n within an ORDS field doesn't help, and in some cases causes problems. If \n is added to an existing record, it just appears along with the rest of the text:

line break problems 1

But if it's added as part of the process of adding a new record, it causes a duplicate record to appear:

line break problems 2

thestoat commented 8 years ago

I have just tried adding

first line of text \n second line of text

And do not see the duplicate line appear. Please confirm this is an issue on Dev.

As for the initial issue, Please explain what you want to see. If you import a record with a line break then it will be shown as a character on the web page. E.g., \n will be shown as \n and
will be shown as
. But that data is still there and, once exported, should be preserved.

Are you saying that you want ORDS to understand all line break characters for all different programs and interpret and present those within the data view? If so, presumably that would be extended to bold attributes, etc?

MerielP commented 8 years ago

I realize nothing is going to be done about this - I'm just updating the issue so that the information is complete, in case anyone comes back to work on these bugs at some point in the future (e.g. as part of an open source version of ORDS).

The duplicate line didn't appear when I tried adding 'first line of text \n second line of text' to a new record on Dev, so perhaps this is only an issue on App.

However, uploading a CSV file containing line breaks resulted in a duplicate copy of the table!

My CSV file had various line breaks in it, and these did not display in the data editing view.

first line second line

showed up in the data editing view as

first linesecond line

The line breaks did show up once I exported the file again, though (though new rows added with \n in them just had those characters; it wasn't interpreted as a line break when I opened the file).

Being able to add multiple lines/paragraphs of text within the same field is an important requirement for many researchers. As it's possible to add line breaks within CSV files and Access databases (I don't know about SQL ones), users are also likely to expect that these will be preserved when a database is uploaded.

Support for other formatting is a much bigger question, which I'll leave for a hypothetical future point when it becomes relevant again!