String manipulation

REMOVEBLANKLINES – Remove blank lines from string

81 views June 1, 2018 admin 0

Overview

This Custom Field removes blanks lines and empty paragraphs from a given string. Only lines ending with a hard return are removed. Formattings tags are ignored. This function is useful for combining the contents of multiple fields and ensuring that empty paragraphs do not result from the concatenation.

Syntax

REMOVEBLANKLINES(String)

Element Description
String The text to process.

Example

Field A Field B Field C
Ford Motor Company Toyota

Without removing blank lines, a concatenation of these fields would be:
CONCAT(FIELDSTR(‘Field A’),’^p’,FIELDSTR(‘Field B’),’^p’,FIELDSTR(‘Field C’))
This would result in an empty paragragh because Field B is empty:

CONCAT(FIELSTR(‘Field A’),’^p’,FIELSTR(‘Field B’),’^p’,FIELDSTR(‘Field C’))
Ford Motor Company
Toyota

Incorporating the REMOVEBLANKLINES Custom Field will remove any empty paragraphs:

REMOVEBLANKLINES(CONCAT(FIELSTR(‘Field A’),’^p’,FIELSTR(‘Field B’),’^p’,FIELDSTR(‘Field C’)))
Ford Motor Company
Toyota

See also

REMOVEDUPLICATES

Was this helpful?