Skip to main content
Nintex Community Menu Bar

Remove Newline from String?

  • March 9, 2015
  • 4 replies
  • 346 views
  • Translate

Forum|alt.badge.img+5

Hi,

 

I have a memo field in my smartform. The user enters a value into the text area and in my workflow I use a subset of this string (first 25 characters) in the subject line of an email. If a user enters a newline in the text area the workflow will fail due to the newline " The specified string is not in the form required for a subject"

 

I have tried using the Trim function in both the smartform and the workflow itself to remove the new line however it hasn't done anything. I can't find any other function that would do this for me.

 

Does anyone have any suggestions?

 

Regards,

Ciara

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

4 replies

Forum|alt.badge.img+10
  • 436 replies
  • March 9, 2015

Hi,

 

There is a "undocumented" special character that is used for line breaks.

In an expression search for the the text "&#10" inside your text box and replace it with a space or empty string.

This should remove all the line breaks.

 

I hope this helps!

Regards,

JohanL

Translate

Forum|alt.badge.img+5
  • Author
  • 26 replies
  • March 9, 2015

Hi JohanL,

 

Thanks for the tip!

 

The expression is actually 


 

I had to add it as a data label to my form and and search for the data label in the text area. It wouldn't work if I just searched for 
. I also had to do the replace on the form and not the workflow as I couldn't get it working using the expression editor there.

 

Thanks again.

 

Cheers,
Ciara

Translate

Hi Ciara,

 

I tried to do the same but I am not able to figure it out. I have added data label and did a transfer data and assigned the values to data label. and then did a replace also on the data label.

your help will b highly appreciated.

 

Thanks

Neeraj Srivastava

Translate

Forum|alt.badge.img+1
  • Novice
  • 4 replies
  • June 27, 2023

Well 8 years later… But I found a way to do this that actually works reliably in K2 Five. 

 

(You don’t need the Trim if you don’t want it.)

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