LISTSERV Maestro 11.1-2 Help Table Of Contents

Calculation Formulas

Back to Calculation Formulas Overview
Back to Functions Overview


Function "HasContent"

HasContent(dropInName)

Function: Checks if the user defined drop-in with the given name has content or is empty. Returns "true" if the drop-in has content, "false" if it is empty.

A non-empty content is a content with at least one non-whitespace character in it. I.e. all content which is either totally empty or which contains only whitespace characters (like space, tab, linebreaks, etc.) is interpreted as empty.

Restriction: This function can only be used in the content of a mail job where the drop-in that is queried by the function is actually included somewhere in the content (other than in this function). If used in a mail job without also including the drop-in itself, the function always results in "false". In a context other than a mail job content (for example in a filter condition), usage of this function results in an "Unknown Function" error.

Also, the specified dropInName must be specified as a single string literal. It cannot be specified as a merge field or nested formula (for example to concatenate the name out of multiple parts). This can either be a single quoted string literal like "dropInNameLiteral", or you can specify a single instance of the ToString function using the special unquoted string literal feature of that function, like ToString(dropInNameLiteral).

Return-Type: Boolean

Arguments:
dropInName - (Type Text): Must specify the name of the user defined drop-in that is to be tested. Note, that this name is specified without the usual drop-in opening and closing tags!

Examples:
HasContent("MyDropIn")
HasContent(ToString(MyDropIn))

© 2002-2023 L-Soft Sweden AB. All rights reserved.