IMPORTANT ANNOUNCEMENT

These forums were permanently set to read-only mode on July 20, 2022. From that day onwards, no new posting or comment is allowed on the site, but the historical content remains intact and searchable.

A new location for posting questions about PlanetPress Suite is now available:

OL Learn - PlanetPress Classic (opens in new tab)

Topic Options
#33003 - 07/20/10 04:37 PM Expressions
calverleys Offline
OL Newbie

Registered: 07/07/10
Posts: 12
Loc: Dallas
I need to know how to skip a field if blank.
I am doing address.
Title First Name Last Name.
Some data i have does not have a Title. I need the ones with No Title to skip the Space that i added after title.

For Example:
Title ones Show

Mr. Jim Smith
2100 Commerce

Non-Title one's

Jim Smith
2100 Commerce

I need to remove the space in front of the Name.

Top
#33004 - 07/20/10 05:09 PM Re: Expressions
Anonymous
Unregistered


calverleys,

You can do this by creating a single variable that contains all your fields. To do this just type @FullName@ in your text box, then click outside of the textbox. Go to the variables tab and you will see the FullName variable appear.

The following expression can be used to dynamically add the title if it exists:

IF(LEN(Trim([Title])) > 0, TRIM([Title]) & " ", "") & [FirstName] & " " & [LastName]

This prints the Title along with a space if the lenght of the title is longer than 0 characters, then prints the first name, a space, and the last name. Just replace the [Title], [FirstName] and [LastName] with your own database field names.

Hope this helps!
Eric.

Top