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
#24739 - 04/20/10 03:17 PM Removing empty spaces
pspdfppd Offline
OL Newbie

Registered: 11/16/09
Posts: 22
Loc: mississauga, ontario, canada
Hi

has anyone had this problem:?

The variables go like this: @salutation@ @firstname@ @last name@ but if the person does not have a salutation then the first name starts out slightly right of being flush left with the text below

example

John Smith
abc company,
anytown.

The space in front of John is the space that must be put in to separate the 3 fields. I tried LTRIM but that only seems to strip out empty spaces from the data base.

Any help appreciated.

Top
#24740 - 04/20/10 03:37 PM Re: Removing empty spaces
Anonymous
Unregistered


Hi,

You can use an expression with an IF condition on your line to fix this. First, remove the space between your salutation and FirstName:
@Salutation@@Firstname@ @last name@

Then, edit your @salutation@ variable to the following:
IF(TRIM([Salutation]) <> "", [Salutation] & " ", "")

This will basically check if your salutation data field is empty. If it's not, it prints the salutation with a space. If it's empty, it prints nothing ("" being an empty string).

Hope this helps,
Eric.

Top
#24741 - 04/20/10 06:35 PM Re: Removing empty spaces
pspdfppd Offline
OL Newbie

Registered: 11/16/09
Posts: 22
Loc: mississauga, ontario, canada
yes,thanks

Top