UPDATE
I have figured out a work around to this issue (see below).
How the workaround functions.
- I made an new multi-line text field column... "Holder CR"
- When I edit the entry, I go to "Holder CR" and hit enter key once.
- When workflow runs, it "uses" the Holder CR "value" properly in
Replace()
- Data returns as one line and then emailed.
THE PROBLEM
After the list entry "saves," it doesn't have the CRLF, Carriage Return value in the multi-line text field that I entered before. As a result, this causes the workflow to error.
Error occurred when performing "apples zebra dog ".Replace(, ): Value cannot be null. Parameter name: oldValue
I was thinking a workaround would to make a Calculated Column in a new column "Holder CR 2" that is the CRLF / Carriage return value. I need the formula to make a CRLF automatically (if there even is one)?
Note: I have tried =CHAR(10)
with no success.
Then at the start of the workflow, I will update "Holder CR" (multi-line text) with "Holder CR 2" (calculated-value that is a "carriage return").
ORIGINAL POST
Using SP Designer 2010, I am attempting to have a Multi-Line text field (plain text) be concatenated into a single line with single-space between terms, alphabetized, and sent in an email.
Input:
apple
zebra
dog
Desired output sent in email:
apple dog zebra
My work to this point:
I use the "replace" action and I am able to replace the (CTRL+Enter) i.e. Carriage Return/New Line with "###" and it works fine, but the output sent in the email has each item still on its own line.
"Find any instance of the value in ##insert value## found in ##insert multi-line text element##, and replace it with ##insert replace value##, with the final string output to ##variable: output name##"
Output with this action:
apple
###zebra
###dog
Desired Output (note that they are alphabetized and a single-space between):
apple dog zebra