View Single Post
  #2   Report Post  
Graham Mayor
 
Posts: n/a
Default

You can put them all in the same conditional field. Note the positions of
the quote marks.

{ IF{ Mergefield ProgStatus} = "AD" "{ Set Variable1 "FoundIt" }{ Set
Variable2 "{ Mergefield AcadProgram }" }{ Set Variable3 "{ Mergefield
AdmitTerm }"}" "{ SET Variable1 "Not Found" }{ Set Variable2 "" }{ Set
Variable3 "" }"}

The results are placed with REF fields.

This seems to work OK with test data using your field names.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




Bill Anderson wrote:
Based on a field in my merge data I am trying to set multiple
variables like:

If {MERGEFIELD ProgStatus} = "AD"
then {Set Variable1 "FoundIt"}
{Set Variable2 {MERGEFIELD AcadProgram} }
{Set Variable3 {MERGEFIELD AdmitTerm} }
otherwise
{Set Variable1 "Not Found"}
{Set Variable2 "" }
{Set Variable3 "" }

something like that. Or must I set up 3 separate IF tests like:
{If {MERGEFIELD ProgStatus} = "AD" {Set Variable1 "FoundIt"} {Set
Variable1 "Not Found"} }

{If {MERGEFIELD ProgStatus} = "AD" {Set Variable2 {MERGEFIELD
AcadProgram} } {Set Variable2 ""} }

{If {MERGEFIELD ProgStatus} = "AD" {Set Variable3 {MERGEFIELD
AdmitTerm} } {Set Variable3 ""} }

Thanks in advance for any help.