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
#24612 - 04/08/09 05:05 PM Zip and barcode issues
SLM Offline
Junior Member

Registered: 04/08/09
Posts: 2
Loc: Nashville, Tenn.
We are in the process of converting over to a different way of receiving our database files.

I have two issues if anyone can help me out with them.

The database outputs zipcodes with 5+4 zip codes without a hyphen. To get the hyphen, I used the expression:

LEFT([Postalcode],5)&"-"&MID([Postalcode], 6,4)

Now, sometimes out data files contain both 5+4 zip codes and plain 5 digit zip codes. However, I need to get rid of that hyphen only for the five digit zip, while keeping it intact with the 5+4. Can someone help me out with this.

Also, we use Postnet barcodes that are already in our database and use a specific font. We don't use PrintshopMail's. However, the database puts a Postnet number for 5 digit zip codes. We do not want the barcodes to print for the 5 digit zip codes; only for the 5+4 zip codes. Does anyone have an expression to use for this matter for the barcode to print with the 5+4 and not the 5?

Thanks,

Todd

Top
#24613 - 04/08/09 05:31 PM Re: Zip and barcode issues
Anonymous
Unregistered


Hi SLM,

What you could do for the first problem, is to create an "IF" statement that checks the length of the variable. If it is longer than 5 characters, execute the expression, or else just show the database field.

Code:
 
IF(LEN([POSTALCODE])>5, "LEFT([Postalcode],5)&"-"&MID([Postalcode], 6,4)","[POSTALCODE]")
 
I am not sure I understand exactly your 2nd problem, but it seems that a similar "IF" statement should take care of it, but it will show nothing if condition is not met, and simply show the database field if condition is met.

Code:
  
IF(LEN([MyDatabaseField])>5, "[MyDatabaseField]","")
Hope this helps. Please give us more details if this was not what you meant. Thanks.

Regards,

Olivier

Top
#24614 - 04/09/09 09:25 AM Re: Zip and barcode issues
SLM Offline
Junior Member

Registered: 04/08/09
Posts: 2
Loc: Nashville, Tenn.
That helped. Thanks!

Top