Developer forum

Forum » Ecommerce - Standard features » Line break in data list 'Download' functionality

Line break in data list 'Download' functionality

Melissa Borgmann
Melissa Borgmann
Reply

Utilizing the standard 'Download' capability in a customer center data list (DW 9.17.10), unwanted line breaks appear in the .csv download file (sample attached and screenshot below). Any ideas on how to mitigate this?


Replies

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Is that because you're opening it as plain text? What if you go to the Data tab in Excel and click Get Data | From File | From Text / CSV and then import the CSV document?

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Oh, I missed the download and now see that it does the same when I import the file. Looks like that data is in the database, and that DynamicWeb doesn't wrap the text in quotes, causing the new line in text to be treated as a new row. 

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hard to find this feature.

But this is datalist export to CSV.

I think you have a line break in the order state called "shipped and invoiced" which probably is like this in the database;

"shipped and
invoiced"

So you can probably change that or replace the linebreak in the SQL on this datalist.

BR Nicolai

 
Melissa Borgmann
Melissa Borgmann
Reply
 
Melissa Borgmann
Melissa Borgmann
Reply

Thanks Nicolai and Imar for the quick responses! This was also my first thought and unfortunately didn't see any indication of a line break in the DB or anything wonky happening in the data list statement itself (attached for reference). Any other ideas on where to check?

 

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply
This post has been marked as an answer

Can you confirm 100% that there's no line break? SSMS may still display items on one line even if there's a line break, and so may a text box, masking the issue. What does this query give you?

SELECT REPLACE(OrderStateDescription, CHAR(10), '#') from EcomOrderStates

This replaces a line break with a # symbol. You may also need to replace CHAR(13) instead.

If you see a # symbol in the results, the line break is there in the database. Otherwise, I'm not sure why you get this result.

Imar

Votes for this answer: 1
 
Melissa Borgmann
Melissa Borgmann
Reply

Imar,

You were right! That's exactly what it was. Filing away that handy trick for future reference. (OrderStateName, btw, not OrderStateDescription).

SELECT REPLACE(OrderStateName, CHAR(10), '#') FROM EcomOrderStates
SELECT REPLACE(OrderStateName, CHAR(13), '#') FROM EcomOrderStates

Fixed:

 

You must be logged in to post in the forum