[Zope] After calling the DTML method, the next-sequence can't work

Angie tel angietel@yahoo.com
Fri, 27 Jul 2001 12:19:53 -0700 (PDT)


--0-783921768-996261593=:25125
Content-Type: text/plain; charset=us-ascii

Hi Phil, 

i got a problem on calling the method. 

i intended to call a search (SQL method) statement, which exactly like this: 

comment:to select one SQL method 
<dtml-if "_['patient_name']!='' and _['patient_id']==''"> 
<dtml-call "REQUEST.set('b', Search_patient3)"> 

<dtml-elif "_['patient_id']=='' and _['patient_name']==''"> 
<dtml-call "REQUEST.set('b', Selectallpatient)"> 
</dtml-if> 

comment:to use the SQL method which already declared in above 
<dtml-in b>......</dtml-in> 

After the DTML method was called out, it still can return the first page correctly but when i click on the --next XXX records-- it return the error message like this: 
Error Type: KeyError 
Error Value: patient_name 
Traceback:................. 

File C:\Program Files\WebSite\lib\python\DocumentTemplate\DT_Util.py, line 339, in eval 
(Object: _['patient_name']!='' and _['patient_id']=='') 
(Info: _) 
File <string>, line 0, in ? 
File C:\Program Files\WebSite\lib\python\DocumentTemplate\DT_Util.py, line 161, in careful_getitem 
KeyError: (see above) 

Is the above if-else statement gone wrong? it seems failed to pass the parameter to the next page, I tried to display the even and odd record in different color, but also can not work 

Angie 



---------------------------------
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
--0-783921768-996261593=:25125
Content-Type: text/html; charset=us-ascii

Hi Phil, <BR><BR>i got a problem on calling the method. <BR><BR>i intended to call a search (SQL method) statement, which exactly like this: <BR><BR>comment:to select one SQL method <BR>&lt;dtml-if "_['patient_name']!='' and _['patient_id']==''"&gt; <BR>&lt;dtml-call "REQUEST.set('b', Search_patient3)"&gt; <BR><BR>&lt;dtml-elif "_['patient_id']=='' and _['patient_name']==''"&gt; <BR>&lt;dtml-call "REQUEST.set('b', Selectallpatient)"&gt; <BR>&lt;/dtml-if&gt; <BR><BR>comment:to use the SQL method which already declared in above <BR>&lt;dtml-in b&gt;......&lt;/dtml-in&gt; <BR><BR>After the DTML method was called out, it still can return the first page correctly but when i click on the <STRONG>--next XXX records--</STRONG> it return the error message like this: <BR>Error Type: KeyError <BR>Error Value: patient_name <BR>Traceback:................. <BR><BR>File C:\Program Files\WebSite\lib\python\DocumentTemplate\DT_Util.py, line 339, in eval <BR>(Object: _['patient_name']!='' and _['patient_id']=='') <BR>(Info: _) <BR>File &lt;string&gt;, line 0, in ? <BR>File C:\Program Files\WebSite\lib\python\DocumentTemplate\DT_Util.py, line 161, in careful_getitem <BR>KeyError: (see above) <BR><BR>Is the above if-else statement gone wrong? it seems failed to pass the parameter to the next page, I tried to display the even and odd record in different color,&nbsp;but also can not work <BR><BR>Angie <BR><p><br><hr size=1><b>Do You Yahoo!?</b><br>
Make international calls for as low as $.04/minute with Yahoo! Messenger<BR><a href="http://phonecard.yahoo.com/?.refer=mailtagline">http://phonecard.yahoo.com/</a>
--0-783921768-996261593=:25125--