Hi Isomorphic,
thanks, this seems to be working for me using v12.0p_2019-02-24.
Best regards
Blama
Announcement
Collapse
No announcement yet.
X
-
Hi Isomorphic,
thanks a lot. I'll report back once I have the time to change my code.
Best regards
Blama
Leave a comment:
-
ImportDataSourceRecord(Map,...) and ImportToDataSource(Map,...) APIs are added and available in recent nightly builds.
Leave a comment:
-
So, we are in sync ) Everything you wrote makes perfect sense and your assumption about escaping is correct - in order to use linefeed inside field value (read "inside a data row") you need to escape backslashes with "\\r". Yet it is simple to do, allowing Map would be a proper way and we are doing it, as mentioned earlier. Till then you may escape backslashes or use another import format.
Leave a comment:
-
FYI: Edited the post. As meta problem it seems that phpBB (or whatever runs the forum) has problems with \\ (backslashes) in data, at least when editing posts :)
Leave a comment:
-
Hi Isomorphic,
answering in different order:
Originally posted by Isomorphic View PostRegarding #3.2 (providing record as a Map instead of Reader to DataImport): do you expect that if we implement it, then this problem would automatically go away?
Originally posted by Isomorphic View PostAre you talking about linefeeds inside field values? And the way DataImport is not working is that it treats those as new lines, which splits data into rows incorrectly and fails, right? We expect such linefeeds to be escaped. Also, do you get these values from some kind of tool? If so, we'd like to know what it is. Thank you.
Code:fieldname: value1; fieldname2: value2; fieldname3: value3;
I then build this from it:
Code:fieldname;fieldname2;fieldname3 "value1";"value2";"value3"
As you can see, I do have "value1" with quotes, which is what you mean by "We expect such linefeeds to be escaped" right?
So an 1-row import with linefeeds could look like this:
Code:fieldname;fieldname2;fieldname3 "value1";"Some long data in field 2";"value3"
Or do you mean I should generated this instead by "We expect such linefeeds to be escaped"
Code:fieldname;fieldname2;fieldname3 "value1";"Some long data\r\nin\r\nfield 2";"value3"
Then I'd also might have problems with "\" (escape it to "\\"?).
This would also work for me for now and the change is easy on my side. But the correct way is using Java Map IMHO. Of course I could also build JSON or XML instead of CSV from the data, which is probably better, now that I think about it, but still, Java Map would be the one with basically no code needed.
Best regards
BlamaLast edited by Blama; 18 Oct 2018, 02:12.
Leave a comment:
-
Just to clarify if we understand #12 correctly. Please answer following questions.
Are you talking about linefeeds inside field values? And the way DataImport is not working is that it treats those as new lines, which splits data into rows incorrectly and fails, right? We expect such linefeeds to be escaped. Also, do you get these values from some kind of tool? If so, we'd like to know what it is. Thank you.
Regarding #3.2 (providing record as a Map instead of Reader to DataImport): do you expect that if we implement it, then this problem would automatically go away? Sorry for delay, we *are* going to implement this and will update this thread when we do.
Leave a comment:
-
Hi Isomorphic,
#3 point 2 is indeed necessary, more a bug than an enhancement if you want to upload data that includes linefeeds (\r, \n, \r\n). If you do this now like convertToCSV() in #3 this will fail if you have linefeeds (because it seems like a new data row in the CSV). This is the one where you write "in progress" in #10.
Linefeeds are perfectly fine in data IMHO and must be converted to <br> at display time if you want to respect them in a label. This is also working as expected when entering them in a TextAreaItem. But they don't work if you need to use DataImport.
Best regards
Blama
Leave a comment:
-
Apologies for the delay, we are addressing issues you listed in #3 (same order as in your post):- fixed
- this suggestion is in progress and will be reported here when it's done
- we've added XML and JSON formats to the DataImport docs with the reference to format descriptions and samples in Smartclient Reference
- taken into consideration
Leave a comment:
-
Hi Isomorphic,
I can see that #1 and #2 are fixed using v11.1p_2017-12-27. Do you have any further information on #3?
Thank you & Best regards
Blama
Leave a comment:
-
Issues #1 and #2 are fixed and are available for download in nightly builds since Dec 15 (today). Issues from #3 are in progress, thank you for your patience.
Leave a comment:
-
Hi Isomorphic,
do you have an update on this one?
Thank you & Best regards
Blama
Leave a comment:
-
These issues are assigned. It's definitely a bug that queueStatus would appear twice; we haven't looked deeply enough into the others to say yet.
Leave a comment:
Leave a comment: