The specified string is not in the form required for a subject

  • 16 February 2021
  • 0 replies
  • 419 views

Userlevel 3
Badge +10
 

The specified string is not in the form required for a subject

kbt131972

PRODUCT
K2 blackpearl
SEE ALSO
 
This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice. This article is not considered official documentation for K2 software and is provided "as is" with no warranties.
LEGACY/ARCHIVED CONTENT
This article has been archived, and/or refers to legacy products, components or features. The content in this article is offered "as is" and will no longer be updated. Archived content is provided for reference purposes only. This content does not infer that the product, component or feature is supported, or that the product, component or feature will continue to function as described herein.

Issue

Workflow email errors with this message:

Image

Symptoms

This error will occur when using a text/memo field in an email subject from an Item Reference, SmartObject, or Data field that contains the encoding:

 

  • newline/line feed/LF/' '

 

Image

 

This is similar to:

https://stackoverflow.com/questions/7239733/resolving-the-specified-string-is-not-in-the-form-required-for-a-subject

Resolution

To resolve this error, inline functions and data field manipulation can be used to remove eplace the line feed; allowing for successful sending of the email.  This will be implemented to the effect of:

 

  1. encoding the text field with the URL Encode() inline function; this will surface the LF as '%0a' so that it is targetable
  2. removing/replacing this '%0a' portion with a Replace() inline function (perhaps replacing the line feed with a space)
  3. decode the field again

 

Image

 

All of the inline functions can also be handled in a single data transfer event:

URL Decode(Replace(URL Encode([SubjectDataField]),%0a,[ReplacementString/EmptyString]))

 

Runtime Example:

Image

Workflow started with a field that has a new line/line feed.

 

 

Image

This is the email Subject with line feed replaced with space.

 

 

Image

This is the data field audit trail if each step was done in a separate transfer data event.

 


0 replies

Be the first to reply!

Reply