I'm trying to get a nested IF statement to work but the ELSE statement doesn't seem to be resolving. Everything else seems to behaving correctly including the various outputs. What am I missing in my statement?
{ IF { MERGEFIELD CODE } = 0001 "Case 1"
{ IF { MERGEFIELD CODE } = 0002 "Case 2"
{ IF { MERGEFIELD CODE } = 0003 "Case 3"
{ IF { MERGEFIELD CODE } = 0004 "Case 4"
{ IF { MERGEFIELD CODE } = 0005 "Case 5"
{ IF { MERGEFIELD CODE } = 0006 "Case 6"
{ IF { MERGEFIELD CODE } = 0007 "Case 7"
}}}}}}
"{ MERGEFIELD ELSEOUTPUT }"
}
If your outputs positive numbers if valid and 0 or nothing otherwise, you could use just:
{MERGEFIELD CODE \# "'Case '0;;'{MERGEFIELD ELSEOUTPUT}'"}
Otherwise, you might use:
{IF{MERGEFIELD CODE \# 0000}= "0001" "Case 1"
{IF{MERGEFIELD CODE \# 0000}= "0002" "Case 2"
{IF{MERGEFIELD CODE \# 0000}= "0003" "Case 3"
{IF{MERGEFIELD CODE \# 0000}= "0004" "Case 4"
{IF{MERGEFIELD CODE \# 0000}= "0005" "Case 5"
{IF{MERGEFIELD CODE \# 0000}= "0006" "Case 6"
{IF{MERGEFIELD CODE \# 0000}= "0007" "Case 7" {MERGEFIELD ELSEOUTPUT}}}}}}}}
or:
{IF{MERGEFIELD CODE}= 1 "Case 1"
{IF{MERGEFIELD CODE}= 2 "Case 2"
{IF{MERGEFIELD CODE}= 3 "Case 3"
{IF{MERGEFIELD CODE}= 4 "Case 4"
{IF{MERGEFIELD CODE}= 5 "Case 5"
{IF{MERGEFIELD CODE}= 6 "Case 6"
{IF{MERGEFIELD CODE}= 7 "Case 7" {MERGEFIELD ELSEOUTPUT}}}}}}}}