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?
Blank lines on labels
3 posts
• Page 1 of 1
Posts: 9
Joined: Mon Dec 27, 2010 12:11 pm Location: Portland, Oregon |
Tom Fitch
FileMaker Pro Certified Developer Portland, Oregon |
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 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 |
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 |
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 3 guests