Re: [greenstone-devel] {If} in format statements

From Stefan Boddie
DateFri, 9 May 2003 17:51:09 +1200
Subject Re: [greenstone-devel] {If} in format statements
In-Reply-To (3EBB38E8-2070001-cs-waikato-ac-nz)
There's no "eq" operator for the {If} in format statements. Perhaps you're
getting confused with the in macro files which can handle this kind of
thing. Your "{If}{[rights] eq A,..." statement will always evaluate to true
since the "eq A" bit will always be non null, regardless of the value of

I've often thought it'd be nice if format statements could do this kind of
thing. Right now it only tests if metadata is null or not though, just like
the manual says.

There are several ugly work arounds you might use. The easiest might be to
set [format] to either 'A' or '', rather than 'A' or 'B'.


----- Original Message -----
From: "John R. McPherson" <>
To: <>
Cc: <>
Sent: Friday, May 09, 2003 5:13 PM
Subject: Re: [greenstone-devel] {If} in format statements

> wrote:
> > format DocumentText "<center><table width=537><tr><td
> > </td></tr></table></center>"
> >
> > I am trying to do a comparison but for some reason cannot get it to
> > anything but IP RIGHTS STATEMENT 'A' Is someone able to provide some
> > on using the {If} statement with 'eq', 'ne' and other operators on
> > fields? (My [rights] metadata for each record is either A or B)
> That looks like it should work... perhaps you need quotes around the
> term(s) in the eq test? Otherwise it might be trying to do integer
> comparison rather than string comparison.
> > Another situation is to have both A and B in my [rights] metadata
> > Has anyone solved this problem?
> Don't know about this situation, sorry. Maybe someone else can
> help with multiple values.
> John
> _______________________________________________
> greenstone-devel mailing list