Multiple Conditional Characters in Mailmerge

T

Tim Whitley

Here's the problem:

I have four "first name" fields that I want to appear in a specific format
based upon if the contents are null. I would like them to appear in the
following formats depending upon if the next field is not empty.

Child_First_1
or Child_First_1 & Child_First_2
or Child_First_1, Child_First_2 & Child_First_3
or Child_First_1, Child_First_2 , Child_First_3 & Child_First_4

I keep messing up the formatting of the IF statement. Any help would be
appreciated.
 
M

macropod

Hi Tim,

Coding your fields like the following should work:
{IF{MERGEFIELD Child_First_4}<> "" "{MERGEFIELD Child_First_1}, {MERGEFIELD
Child_First_2}, {MERGEFIELD Child_First_3} & {MERGEFIELD Child_First_4}"
{IF{MERGEFIELD Child_First_3}<> "" "{MERGEFIELD Child_First_1}, {MERGEFIELD
Child_First_2}, & {MERGEFIELD Child_First_3}" {IF{MERGEFIELD
Child_First_2}<> "" "{MERGEFIELD Child_First_1}, & {MERGEFIELD
Child_First_2}" {MERGEFIELD Child_First_1}}}}

Cheers
 
T

Tim Whitley

Works perfectly, thanks!

macropod said:
Hi Tim,

Coding your fields like the following should work:
{IF{MERGEFIELD Child_First_4}<> "" "{MERGEFIELD Child_First_1}, {MERGEFIELD
Child_First_2}, {MERGEFIELD Child_First_3} & {MERGEFIELD Child_First_4}"
{IF{MERGEFIELD Child_First_3}<> "" "{MERGEFIELD Child_First_1}, {MERGEFIELD
Child_First_2}, & {MERGEFIELD Child_First_3}" {IF{MERGEFIELD
Child_First_2}<> "" "{MERGEFIELD Child_First_1}, & {MERGEFIELD
Child_First_2}" {MERGEFIELD Child_First_1}}}}

Cheers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top