AnsweredAssumed Answered

Mailing label script

Question asked by Deenos on May 11, 2015
Latest reply on May 11, 2015 by philmodjunk

Title

Mailing label script

Post

Hi:

This is the script i have to lay out the field on the label. The problem I'm having is getting is removing the comma if there is no data in the second address field. The label looks like this:

253 W 35th Street, 6th Floor
New York, NY 10001

However, I do not want the comma to appear if there is not data in the second address field (apt, floor or unit data). This is the script I wrote. What am I missing?
 

P_street & P_street & "," & Case( not IsEmpty( P_street) and not IsEmpty(P_city & P_state & P_zip ); "¶" ) &
Trim(
 
   P_city & Case( not IsEmpty( P_city ) and not IsEmpty( P_state & P_zip ); " " ) &
    P_state & Case( not IsEmpty( P_state ) and not IsEmpty( P_zip ); " " ) &
    P_zip & Case( not IsEmpty( P_city & P_state & P_zip ) and not IsEmpty( P_country ); "¶" )
) &
P_country

Any help is greatly appreciated.

Thanks

 

Outcomes