Blank lines on labels

Support, Tips and Tricks for Proof Group's fmSpark "merge anything" utility for FileMaker Pro.
Posts: 9
Joined: Mon Dec 27, 2010 12:11 pm
Location: Portland, Oregon
PostPosted: Mon Jan 17, 2011 10:11 pm
My label has an Address1 and Address2 line. If Address2 is blank I'd like the text below to slide up the way merge fields normally do.

Can the MergeExpressions custom function be modified to deal with this? Or do you have any other suggestions?
Tom Fitch
FileMaker Pro Certified Developer
Portland, Oregon
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Tue Jan 18, 2011 9:58 am
You don't want to edit MergeExpressions to do this directly as it is used everywhere, not only where there are return separated values. Rather, remember that you can include calculations in your merge fields so instead of...

<<CONTACTS::Full Name>>
<<CONTACTS::Street 1>>
<<CONTACTS::Street 2>>
<<CONTACTS::City 1>>, <<CONTACTS::State Province 1>> <<CONTACTS::Postal Code 1>>

...try...

<<CONTACTS::Full Name>>
<<CONTACTS::Street 1 & if ( not isempty (CONTACTS::Street 2) ; ¶ & CONTACTS::Street 2 )>>
<<CONTACTS::City 1>>, <<CONTACTS::State Province 1>> <<CONTACTS::Postal Code 1>>
John Sindelar
SeedCode
Posts: 9
Joined: Mon Dec 27, 2010 12:11 pm
Location: Portland, Oregon
PostPosted: Wed Jan 19, 2011 10:58 pm
I knew there was some way to do it - thanks! At first I didn't get it, but then I looked closer at your example and realized the key is that the calc has to be in brackets, like the fields. I found that both of these methods gave me the result I wanted:

<<CONTACTS::Full Name>>
<<List(Location::Address1;Location::Address2)>>
<<Location::City>>, <<Location::State>> <<Location::PostalCode>>

<<List (
CONTACTS::Full Name ;
Location::Address1 ;
Location::Address2 ;
Location::City & ", " & Location::State & " " & Location::PostalCode )>>
Tom Fitch
FileMaker Pro Certified Developer
Portland, Oregon

Return to fmSpark

Who is online

Users browsing this forum: No registered users and 3 guests

cron
(855) SEEDCODE
[email protected]
Follow us: