View Single Post
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Syntax is Wrong but I Cannot See it

There are a few issues in your example
1. The first dropdown entry is 'Broadly Compliant' yet your IF field is
looking for 'Broadly compliant'. The searches are case sensitive. To get
round that add a \*Lower formatting switch and put the search all in lower
case (see later)
2. {IF(Article21Dropdown} = " Non compliant - minor risk " has unwanted
spaces between the quotes and the text.
3. As the major and minor risk options reproduce the same text you can use a
wildcard in the search e.g. = "non compliant*"
4. It probably makes better sense here to use a sequence of conditional
fields on the same line rather than nested fields as there are only four
possible results from three conditional fields.
Thus:

{ IF { Article21Dropdown \*lower } = "not applicable" ""}{ IF{
Article21Dropdown \*lower } = "broadly compliant" "The responsible person
had ensured that his employees were provided with adequate safety training
in a manner appropriate to the risk identified by the risk assessment.
" }{ IF{ Article21Dropdown \*lower } = "non compliant*" "The responsible
person had not ensured that, where a dangerous substance was present in the
premises, the risk to relevant persons was eliminated or reduced so far as
was reasonably practicable."}

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




"David A Wood" wrote in message
...
Hi

I have a field with 4 choice answers in a dropdown list

"Not Applicable"
"Broadly Compliant"
"Non compliant - minor risk"
"Non compliant - major risk"

Using multiple "IF" I have used the following code -

{IF{Article21Dropdown} = "Broadly compliant" " The responsible person
had
ensured that his employees were provided with adequate safety training in
a
manner appropriate to the risk identified by the risk assessment. "
{IF(Article21Dropdown} = " Non compliant - minor risk " " The responsible
person had not ensured that, where a dangerous substance was present in
the
premises, the risk to relevant persons was eliminated or reduced so far as
was reasonably practicable." {IF{Article21Dropdown} = "Non compliant -
major
risk" "The responsible person had not ensured that, where a dangerous
substance was present in the premises, the risk to relevant persons was
eliminated or reduced so far as was reasonably practicable." " "}"}"}

The aim?
"Not Applicable" - returns blank
"Broadly Compliant" - returns "The responsible person had ensured etc"..

Next two choices return the same text line "The responsible person had not
ensured that,... etc"

Have succeeded with a three state IF but failed with this..

Thanks for any help forthcoming.