You are viewing limited content. For full access, please sign in.

Question

Question

Line Break in Field Terminates Workflow

asked on July 16, 2015 Show version history

We have a client who sometimes has a workflow fail when a line break is entered into a single-value field that the workflow is supposed to retrieve - for example, a user will copy text from an existing document in a format like this and paste it into the field:

Smith, John R. MD

A Professional Corp PSP

When the workflow retrieves the field value, it terminates with an Invalid Object Name error. Could anyone help me with a regex expression that will remove any line breaks from a field, but leave all text before and after them?

Thanks!

1 0

Answer

SELECTED ANSWER
replied on July 16, 2015

[^\r\n]+ set to all matches combined with no spaces will convert the 2 lines above to "Smith, John R. MDA Professional Corp PSP".  New lines are usually indicated with \n, \r\n or \n\n, so the pattern above will return everything but newline characters.

2 0
replied on October 18, 2018

Thank you.

0 0

Replies

replied on July 16, 2015

Thanks Miruna!

0 0
replied on August 23, 2016

What am I doing wrong?

 

0 0
replied on August 23, 2016

You're using in-line pattern matching which does not have the option to get multiple matches. You need to use a Pattern Matching activity separately to generate the value first, not just format the token in-place.

1 0
replied on August 23, 2016

An 8 second-span before a reply that solved my question...that's impressive! 

Thanks very much!!

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.