The self-reference thing should not be an issue. The precise syntax may be
critical here.
1. All the {} must be the special field code braces that you can insert
using ctrl-F9
2. I would always ensure there are spaces between the various items in the
field, and quote the two results i.e.
{ IF { MERGEFIELD Contact } = "" "{ MERGEFIELD CompanyName }" "{MERGEFIELD
Contact}" }
3. Although I do not believe it makes any difference in most (if not all)
cases, I program defensively and quote any field I'm comparing with "", i.e.
{ IF "{ MERGEFIELD Contact }" = "" "{ MERGEFIELD CompanyName }" "{MERGEFIELD
Contact}" }
Other than that, it is worth checking exactly what { MERGEFIELD Contact } is
returning. If it returns even a single space, the comparison will fail.

Signature
Peter Jamieson
> Greg,
>
[quoted text clipped - 47 lines]
> >>Andrew
> >>.
Dinsdale - 13 Jul 2004 11:07 GMT
Thanks Peter. I will persevere.
Andrew
> The self-reference thing should not be an issue. The precise syntax may be
> critical here.
[quoted text clipped - 16 lines]
> Other than that, it is worth checking exactly what { MERGEFIELD Contact } is
> returning. If it returns even a single space, the comparison will fail.
Dinsdale - 15 Jul 2004 07:25 GMT
Peter and Greg,
It works! The reason it didn't work earlier was I forgot about the
ctrl-F9 bit and simply did a cut and paste. Doh!!!
Thanks again.
Andrew
> The self-reference thing should not be an issue. The precise syntax may be
> critical here.
[quoted text clipped - 16 lines]
> Other than that, it is worth checking exactly what { MERGEFIELD Contact } is
> returning. If it returns even a single space, the comparison will fail.