Help! Nested IF

  • Thread starter Thread starter Steve
  • Start date Start date
S

Steve

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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top