Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
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. |
#2
![]() |
|||
|
|||
![]()
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. |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
MERGE: Can I have multiple SET statements based on one IF | Mailmerge | |||
Switch an image dynamically based on mail merge field - possible? | Mailmerge | |||
Using Hyperlinks in Mail Merge IF...THEN...ELSE Statements | Mailmerge | |||
Need multiple Ifs in Merge Fields | Mailmerge | |||
Merge multiple documents? | New Users |