Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Help! Nested IF
Hello,
I have been trying all day to figure this one out and I can't get it to work. I have three nested IF fields. The way I wrote it only the first two conditions seem to work properly it does not see the third. Here is what I have. {IF {REF "teight"} ="CPI Rent" {INCLUDETEXT "c:\\template\\17.01A.doc"}{IF {REF "teight"} ="%GRP without 5yrs" {INCLUDETEXT "c:\\template\\17.01A.doc"}{IF {REF "teight"} ="%GRP with 5yrs" {INCLUDETEXT "c:\\template\\17.01A.doc"}{INCLUDETEXT "c:\\template\\17.01B.doc"}}}} Only the first two conditions CPI Rent and %GRP without 5yrs work the third %GRP with 5yrs returns with the 17.01B when it should be 17.01A. I have 5 items in my dropdown box. What am i doing wrong? Thanks Steve |
#2
|
|||
|
|||
Hi Steve,
Your problem is that the spacing between the various expressions isn't right. For example, after applying the IF tests, between the '=' and the true results or between the true and false results. Consequently, you'll only ever get the true result. Try: {IF{teight}= "CPI Rent" {INCLUDETEXT "c:\\template\\17.01A.doc"} {IF{teight}= "%GRP without 5yrs" {INCLUDETEXT "c:\\template\\17.01A.doc"} {IF{teight}= " %GRP with 5yrs" {INCLUDETEXT "c:\\template\\17.01A.doc"} {INCLUDETEXT "c:\\template\\17.01B.doc"}}}} Cheers "Steve" wrote in message om... Hello, I have been trying all day to figure this one out and I can't get it to work. I have three nested IF fields. The way I wrote it only the first two conditions seem to work properly it does not see the third. Here is what I have. {IF {REF "teight"} ="CPI Rent" {INCLUDETEXT "c:\\template\\17.01A.doc"}{IF {REF "teight"} ="%GRP without 5yrs" {INCLUDETEXT "c:\\template\\17.01A.doc"}{IF {REF "teight"} ="%GRP with 5yrs" {INCLUDETEXT "c:\\template\\17.01A.doc"}{INCLUDETEXT "c:\\template\\17.01B.doc"}}}} Only the first two conditions CPI Rent and %GRP without 5yrs work the third %GRP with 5yrs returns with the 17.01B when it should be 17.01A. I have 5 items in my dropdown box. What am i doing wrong? Thanks Steve |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Help with nested tables | Tables | |||
How do I "un-nest" a table from nested tables? | Tables | |||
Nested If | Mailmerge | |||
# Range inside "Nested If" Statement | Mailmerge |