Punctuate Function

Description 1 of 2 (punctuate a multi-line text):
Punctuate a multi-line text by removing the line-break characters and:
(i) concatenating the ultimate punctuation symbol to the end of the last line;
(ii) concatenating the symbol for two members, if there are only two lines and if it exists;
(iii) concatenating the penultimate punctuation symbol to the end of the last-but-one line, if it exists;
(iv) concatenating the leading punctuation symbol to the end of all the other lines, if they exist.
Returns:
Text
Parameters:
Parameter
Data Type
Description
1
Text
The multi-line text.
2
Text
The leading punctuation symbol.
3
Text
The penultimate punctuation symbol.
4
Text
The ultimate punctuation symbol.
5
Text
The symbol for two members.
Examples:
When using functions inside a field, remember the field brackets.
{Punctuate(VariableName, "; ", " and ", ".")}
Expression
Result
Punctuate( "a^Lb^Lc^Ld", ", ", ", and ", ".", " and ")
"a, b, c, and d."
Punctuate( "a^Lb", ", ", ", and ", ".", " and ")
"a and b."
Punctuate( "a^Lb", ", ", " and ", "." )
"a and b."
Punctuate( "a", ", ", " and ", "." )
"a."
This function is often used with the format keyword:
{ServicesIncluded Format " ; | and |.")}
Description 2 of 2 (punctuate a list of text values):
Punctuate a list of texts by:
(i) concatenating the ultimate punctuation symbol to the end of the last member of the list;
(ii) concatenating the symbol for two members, if there are only two members and if it exists;
(ii) concatenating the penultimate punctuation symbol to the end of the last-but-one member of the list, if it exists;
(iv) concatenating the leading punctuation symbol to the end of all the other members of the list, if they exist.
Returns:
Text
Parameters:
Parameter
Data Type
Description
1
Any*
The list.
2
Text
The leading punctuation symbol.
3
Text
The penultimate punctuation symbol.
4
Text
The ultimate punctuation symbol.
5
Text
The symbol for two members.
Examples:
When using functions inside a field, remember the field brackets:
{Punctuate(List(SellerAddressLine1, SellerCity, SellerState, SellerZip),  ", ", " ", " ")}
Expression
Result
Punctuate( List("a","b","c","d"), ", ", ", and ", ".", " and ")
"a, b, c, and d."
Punctuate( List("a","b"), ", ", ", and ", ".", " and ")
"a and b."
Punctuate( List("a","b"), ", ", " and ", "." )
"a and b."
Punctuate( List("a"), ", ", " and ", "." )
"a."

Related content