[Zope] sqlgroup-if-and-else-or dilemma
TFE MMS JARVIS JOHN
jarvis.sd082@ex.tel.co.jp
Wed, 8 Sep 1999 18:22:26 +0900
Hi all,
I'm trying to construct a search interface which allows users to
build a set of search conditions against a large DB view. One of the
requirements for this is that the users be able to choose between AND
and OR operators for each condition.
Something like (silly example...):
Country = Japan
and Area = Tokyo
or Area = Kyushu
These conditions are converted to a where statement using DTML. The
problem is that Zope (still 1.10.3 :^( complains about unexpected
<!--#and--> and <!--#or--> tags within <!--#if--> blocks.
For example:
<!--#sqlgroup where-->
...
generated conditions
...
<!--#if "LogOp=='AND'"-->
<!--#and-->
<!--#else-->
<!--#or-->
<!--#/if-->
...
Another condition
...
<!--#/sqlgroup-->
doesn't work.
I guess the Zope internals weren't meant to handle this
construct. Has anyone been here before? Any ideas?
Any suggestions would be greatly appreciated.
Happy Zopeing!
John Jarvis