2011-03-29
Dismiss this until next updateThis documentation has been updated

The latest version of PrintShop Mail is currently 7.1. This documentation was updated on 2011-03-29 and covers the changes made in this version. If you are still using an older version of PrintShop Mail, you can access its documentation by using the Version: menu at the top-right corner of this screen.

If you wish to upgrade to PrintShop Mail7.1, you can do so via the Upgrade Request page. Note that in order to upgrade, you will need a valid OL Care contract as of 2010-09.

LEN

Syntax

LEN(Text)

Description

Returns the number of characters in <Text>.

Example

LEN ("Personalized Printing") => 21

Parameter description

Text

Any text expression or data field containing a text.

You can use this function to calculate the length (the number of characters) of the database field. For example, certain ZIP codes or barcodes might need to have a specific number of characters to print correctly.

LEN is often used in combination with other functions, such as LEFT, RIGHT, MID and IF, where it can be used to determine exactly how many characters are printed of a selected database field.

In the following example, IF and LEN are combined to calculate the length of the "gender" database field. It also ensures that fields without text, but with spacing, are recognized and eventually the correct output is generated.

First Name

Last Name

Gender

John

Abrahams

M

Theresa

Johnson

F

William

Fremont

M

Tom

Cooper

 

IF(LEN([GENDER]) = 0, "Dear Sir, Madam", IF([GENDER] = "m", "Dear Mr." & [Name], "Dear Ms" & [Name] ) )

The result is:

Dear Mr John Abrahams

Dear Ms Theresa Johnson

Dear Mr William Fremont

Dear Sir, Madam