Thread: [Solved] Nesting Merge Fields
View Single Post
 
Old 09-19-2017, 01:54 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,379
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

It's not clear from what you've posted whether there are actually seven different variation of the text you want to output. You field coding suggests you want "2017 Fund_Arts" to appear if the field is empty, and "ARTS" otherwise, which you can achieve via:

{IF{MERGEFIELD Fund_description_1} = "" "2017 Fund_Arts" "ARTS"}

However, I suspect you actually intended to substitute "ARTS" in the output, as in:

{IF{MERGEFIELD Fund_description_1} = "2017 Fund_Arts" "ARTS"}

and, likewise:

{IF{MERGEFIELD Fund_description_1} = "2017 Fund _Athletics" "ATHLETICS"}
{IF{MERGEFIELD Fund_description_1} = "2017 FUND_Financial Aid" "FINANCIAL AID"}

If so, there is no need to nest any of the fields, though you can do so if you really want to. You could just insert them one after the other:

{IF{MERGEFIELD Fund_description_1} = "2017 Fund_Arts" "ARTS"}{IF{MERGEFIELD Fund_description_1} = "2017 Fund _Athletics" "ATHLETICS"}{IF{MERGEFIELD Fund_description_1} = "2017 FUND_Financial Aid" "FINANCIAL AID"}

Nested, they'd become:

{IF{MERGEFIELD Fund_description_1} = "2017 Fund_Arts" "ARTS" {IF{MERGEFIELD Fund_description_1} = "2017 Fund _Athletics" "ATHLETICS" {IF{MERGEFIELD Fund_description_1} = "2017 FUND_Financial Aid" "FINANCIAL AID"}}}

Hint: So that you don't have to change the field codes every year, you might consider deleting the year identifiers from the fields in the data source. Alternatively, you could code the fields like:

{IF{MERGEFIELD Fund_description_1} = "???? Fund_Arts" "ARTS"}{IF{MERGEFIELD Fund_description_1} = "???? Fund _Athletics" "ATHLETICS"}{IF{MERGEFIELD Fund_description_1} = "???? FUND_Financial Aid" "FINANCIAL AID"}
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote