The specified string is not in the form required for a subject
Issue
Workflow email errors with this message:
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/' '
This is similar to:
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:
- encoding the text field with the URL Encode() inline function; this will surface the LF as '%0a' so that it is targetable
- removing/replacing this '%0a' portion with a Replace() inline function (perhaps replacing the line feed with a space)
- decode the field again
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:
Workflow started with a field that has a new line/line feed.
This is the email Subject with line feed replaced with space.
This is the data field audit trail if each step was done in a separate transfer data event.