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
 
Top