problem with if statement

  • Thread starter Thread starter kbutterly
  • Start date Start date
K

kbutterly

Good afternoon, all,

I am using IF fields along with DOCPROPERTY fields to INCLUDETEXT
conditionally.

Here is my IF statement

{IF {=OR({DOCPROPERTY Audience} = "ProgramOffice",{DOCPROPERTY
Audience} = "All")} {INCLUDETEXT "{DOCPROPERTY
FilePath}\\ContractsFundingsSourcesPO.doc"} "XXXX"}

The problem is that the ContractsFundingsSourcesPO.doc is included no
matter what audience is set to.

Can anyone spot the error in the above?

Thanks,
Kathryn
 
The problem is that OR is not a valid field (you're thinking of Excel,
perhaps?) -- but the IF statement apparently interprets the non-zero
response as 'YES'. To diagnose this kind of problem, test the nested fields
separately, eg

{=OR({DOCPROPERTY Audience} = "ProgramOffice",{DOCPROPERTY Audience} =
"All")}

As you'll see, this gives !syntaxerror.
 

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