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
What I want:
What I actually get looks like this:
Solved! Go to Solution.
Brent Ellis I have managed to do that in a quite straightforward way. In the following steps:
I tried the exact same solution as you, but my tenancy seems to be behaving differently in that it dosent hold onto the 'enter' representing the newline. I even tried your exact string, but still it fails. When i return to the regular expression it looks to have reset itself to the single default line. Am I missing a trick?
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.
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?
I have tried IE11 and the copy & paste but still the same result. Our scenarios are slightly different in that I am including the output variable in the body of an email whereas you are saving it back to a list. I wonder if it’s the HTML in the email body causing it to drop the line breaks? I will try saving back to the list to at least prove I can replicate what you are doing. What were the settings for the list item you setup – multiline with plain text?
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
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:
I wish it was that easy! Below will explain what's happening:
1. I use Query XML to extract strings from repeater section into a variable (all good)
2. I use a Regular Expression to replace " in the variable with a newline and save list to list item (all good - thankyou)
3. I include the list item in the body of the email (issue - it comes through as a single line)
Why does that work for me??? :,(
My string: \u000d\u000a
Could this be the problem? That it somehow is interpreted as a regex command because of the "\"???
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.