Boolean Operator in {if}?

A

Andy Chan

Dear all,

I would like to show a record if two mergefields are not empty. Can I
use a boolean operator "AND" in the command {IF}?

Best Regards,
Andy
 
M

macropod

Hi Andy,

Word does have an AND function you can use in fields, but it will only work
with numerics. There are ways around this for text strings, such as:
{IF{IF{MERGEFIELD Field1}= "" 1 0}*{IF{MERGEFIELD Field2}= "" 1 0}= 1 ""
"Output text"}
Equally, you could nest two IF fields, as in:
{IF{MERGEFIELD Field1}= "" {IF{MERGEFIELD Field2}= "" "Output text"}

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