cancel
Showing results for 
Search instead for 
Did you mean: 
drcoz
Nintex Newbie

SharePoint List to CSV, with Comma’s in field list.

Jump to solution

 

So, I’ve searched and searched for an answer to how to export a list to a CSV file when one of the columns in SharePoint list has comma’s in it, example FIRSTNAME, LASTNAME. All I get is how to export list to CSV but none of the examples tell me how to keep a comma in a field.  I’ve reviewed several posts by Vadim Tabakman so please DO NOT refer me to any, they are not answering my question/issue.

 

So, lets me show you what I have.

 

Here is my list of employees’. Dummy list 😊

 

1.png

The above list feeds the FULL NAME only to the below list via a lookup. The Employee Directory has other uses.

2.png

You will note, which is my issue, that in the NAME column the format of the name is LASTNAME, FIRSTNAME.

Now below is the NINTEX Workflow 2013. This is a SITE workflow as I need it to run at a certain time every day.

3.png

The workflow works the way it is, with two exceptions:

  1. I can’t get the name to stay in one cell in excel. Name format has to be LASTNAME, FIRSTNAME. Because of the comma, it splitting the name into two cells. I added the two headers for the Last Name and First Name as I was trying to fix my #2 issue.
  2. I keep getting the last field wrapping to the second line.

Below is what’s happening and what I need to happen:

4.png

So, here is the last build string before the email is created, which is where I think my issue is, but I can’t figure out why?

5.png

ONE, will not stay on one line when exported to excel and TWO how I can export the name as

 

LASTNAME, FIRSTNAME into one cell as I’m showing in the above picture.

Labels: (1)
0 Kudos
Reply
2 Replies
drcoz
Nintex Newbie

Re: SharePoint List to CSV, with Comma’s in field list.

Jump to solution
My #1 Issue solved:
What I did was to take a spreadsheet with the information I needed, the way I needed it and them exported it to a .csv file. I then opened up the .csv with a text editor and saw the answer which is:
Put “ “ around the variable like this: "{WorkflowVariable:slot-name}"
Once I did this and ran it, the .csv file knew exactly what to do.
0 Kudos
Reply
drcoz
Nintex Newbie

Re: SharePoint List to CSV, with Comma’s in field list.

Jump to solution
#2 Issue soved:
I reviewed an article called, “Build a Nintex Workflow That Loops Through a List or Library to Extract and Publish Data to a CSV File” by Patrick Kelligan

Not sure what I really did. I played around with the pipe “|” on the last line by adding it and removing it. The only other thing I did was to change the last build string to look like this:

{WorkflowVariable:mlof-PERSTAT-csv}
{WorkflowVariable:slot-Unit},{WorkflowVariable:slot-Asg-Atch},{WorkflowVariable:slot-category},"{WorkflowVariable:slot-name}",{WorkflowVariable:slot-status-abrev},{WorkflowVariable:slot-start},{WorkflowVariable:slot-return123}

and the first build string to look like this:

Unit, ASG/ATCH, Personnel Category, Last Name First Name, Status (Abbreviated), From, To{Common:NewLine}

Regardless what I did it is now working, so I hope this will help someone else.

View solution in original post

0 Kudos
Reply