Skip to main content
Nintex Community Menu Bar
Solved

Line Break in Multi Line column in Doc Library via Workflow

  • September 22, 2016
  • 12 replies
  • 449 views
  • Translate

Forum|alt.badge.img+9

I have a document library the contains a Multiple Lines of Text column (plain text is only option in doc lib).  Is it possible to do a "new line" or "line break" in my Set Workflow Variable action or Set Field action 

 

Example

 

What I want:

Entry 1

Entry 2

Entry 3

 

What I actually get looks like this:

Entry 1Entry2Entry3

Best answer by TomaszPoszytek

So I made a bit more of investigation as this issue got a bit disturbing for me

I have created a new list (it is built from 1 additional column, that is Multiline and called "Multiline_rows" and is a "Plain text" field):

I then created a list workflow (exported file in the attachment). It is replacing the "#" character in a string with a newline.

The workflow is updating the list item's field "Multiline_rows" with the replaced string (either by using simple insert of the variable and via the "Advanced Lookup" choosing "Description Text"):

In both approaches, the replaced string displays as a single line when I go into a list:

However both when using a "Quick edit" as well as when editing the item itself, I see that the operation of replacement did its job properly (there are <br>'s inserted): 

Also, when looking at my e-mail via the browser version of the Outlook, string is displayed in multiple lines (again, for both ways of inserting a variable into a body):

So what's wrong?

It seems that the reason is related to the interface of the application/ SharePoint. Be aware, that at first I displayed the list using the new SharePoint Look&Feel. And it showed the string in a single line.

HOWEVER when I switched the view to the "Return to classic SharePoint"

contents of the list respects the new lines:

So what I can say is... Depending on which application/ using which SP interface you are using to view the data, it does respect the multiline formatting or not and.. frankly speaking I doubt if you can do anything about that

Regards,

Tomasz

View original
Did this topic help you find an answer to your question?

12 replies

TomaszPoszytek
Forum|alt.badge.img+17

Brent Ellis I have managed to do that in a quite straightforward way. In the following steps:

  1. I've created a text variable, in which I've concatenated the string using a special char (# in my case) as a delimiter: Entry 1#Entry 2#Entry 3
  2. I then used the "Regular Expression" action in which I've replaced the # char with... a simple "enter" - I just put a cursor in the field and hit "Enter" key:
  3. That's it! It works like a charm.

Translate

TomaszPoszytek
Forum|alt.badge.img+17

Yes, that's a fact - opening the action again shows the new line is reset.

Maybe try the other way round - open a notepad or a WordPad application, make a newline there, then copy-paste (CTRL+A --> CTRL+V) it to the Regular Expression action. I did that in the first place, but then realized I can just hit enter in the field without going via the external application.

Translate

TomaszPoszytek
Forum|alt.badge.img+17

But in the end I really did those two steps and it worked. I just added the newline, saved the action and published the workflow. Then the updated in the list item field showed me the string divided into 3 lines.

I did it under Internet Explorer 11. Maybe the browser is messing something? Maybe try Chrome?

Translate

TomaszPoszytek
Forum|alt.badge.img+17

Yes, the field was a multiple lines with only plain text.

Jonathan Webb if you are then trying to paste data into mail body, why not to just insert

<br/>

tags as a new line markers? I suppose your e-mail is in the HTML format thus <br/> should be treated as an ordinary line breaker

If not, then maybe the:

character?

Regards,

Tomasz

Translate

TomaszPoszytek
Forum|alt.badge.img+17

Then maybe try not to include the "Current Item: Multiline Cost Description" but the variable you used to fill the field's value in the first place?

Because in your scenario I can be sure that the newline information is lost somewhere.

Regards,

Tomasz

Translate

TomaszPoszytek
Forum|alt.badge.img+17

Then maybe for the purpose of the e-mail try using <br> when replacing the "#" character?

So you will have to variables in the end, one for the e-mail, second for Excel/ SharePoint list?

Just to be sure: multiple lines works fine for the SharePoint list and Excel file, but not for the E-mail body?

Translate

TomaszPoszytek
Forum|alt.badge.img+17

I do not understand only why in your SharePoint list view data is not displayed in a separate lines. I don't say my solution is the best, however it really worked. I had my data in multiple line (using the "old SharePoint look&feel for lists" ). 

Translate

TomaszPoszytek
Forum|alt.badge.img+17

So I made a bit more of investigation as this issue got a bit disturbing for me

I have created a new list (it is built from 1 additional column, that is Multiline and called "Multiline_rows" and is a "Plain text" field):

I then created a list workflow (exported file in the attachment). It is replacing the "#" character in a string with a newline.

The workflow is updating the list item's field "Multiline_rows" with the replaced string (either by using simple insert of the variable and via the "Advanced Lookup" choosing "Description Text"):

In both approaches, the replaced string displays as a single line when I go into a list:

However both when using a "Quick edit" as well as when editing the item itself, I see that the operation of replacement did its job properly (there are <br>'s inserted): 

Also, when looking at my e-mail via the browser version of the Outlook, string is displayed in multiple lines (again, for both ways of inserting a variable into a body):

So what's wrong?

It seems that the reason is related to the interface of the application/ SharePoint. Be aware, that at first I displayed the list using the new SharePoint Look&Feel. And it showed the string in a single line.

HOWEVER when I switched the view to the "Return to classic SharePoint"

contents of the list respects the new lines:

So what I can say is... Depending on which application/ using which SP interface you are using to view the data, it does respect the multiline formatting or not and.. frankly speaking I doubt if you can do anything about that

Regards,

Tomasz

Translate

TomaszPoszytek
Forum|alt.badge.img+17

You welcome If you find my answer sufficient you can mark it as "the answer"

Translate

Forum|alt.badge.img+10
  • Novice
  • 125 replies
  • August 4, 2017

Why does that work for me??? :,(

My string: u000du000a

Could this be the problem? That it somehow is interpreted as a regex command because of the """???

Translate

  • Novice
  • 13 replies
  • December 29, 2019

At the end of 2019, this solution still works in the latest version of Nintex for O365:

To get multiple lines displayed in a multi-line column in a SharePoint list item, use a Regular Expression action to replace a separator of your choice with an Enter in the Replacement String.

Note however that if you open the Regular Expression action again, your Enter is gone.

 

Would be good to see this properly supported in Nintex though without the need for this regular expression action.

Translate

This worked for me (using the <br> as replacement in the regex action)

Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings