View Single Post
  #10   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson
 
Posts: n/a
Default Skip Record if Comparison of Several Fields Fails

You can look up the available functions and operators in the Word help for
the = field. However, that can be hard to find as the field isn't listed in
the help index - you can search for "formula field" in the "Search for" box
in Word Help.

+ is just the usual addition operator and * is the usual multiplication
operator. it is sometimes easier to use these rather than the or and and
functions which are also available because or and and only take two
parameters, i.e. you can have

{ =or(param1,param2) }

but for three parameters I think you need

{ =or(param1,or(param1,param2)) }

The thing to bear in mind is that within the formula field "True" is
represented as "1" and "False" as "0", so in the first example above, if
param1 or param2 is true or 1, then the result is "1".

However, the fields as suggested here obviously won't work because your
structures are actually slightly different.

Peter Jamieson

"Nick" wrote in message
oups.com...
Peter -

In the solution below:

{ SKIPIF
{ =
{ IF { MERGEFIELD target } = { MERGEFIELD choice_1 } "1" "0" }
+{ IF { MERGEFIELD target } = { MERGEFIELD choice_2 } "1" "0" }
+{ IF { MERGEFIELD target } = { MERGEFIELD choice_3 } "1" "0" }
*{ IF { MERGEFIELD rating_1 } = { MERGEFIELD rating_2 }
"{ IF { MERGEFIELD rating_2 } = { MERGEFIELD rating_3 } "0" "1" }"
"1" }

there are some operators (+ and *). Can you tell me about other
available operators? Is there an "or" operator?

Nick King