[Zope] Problem inserting <dtml-var sequence-item> using ZSQL method in a dtml-in tag

Dieter Maurer dieter at handshake.de
Wed Jan 14 16:59:19 EST 2004


Gabriela López Ruiz wrote at 2004-1-14 12:24 -0300:
>Now I have a problem trying to insert a group of records in a relational 
>table. I'm using ZSQL and the fact is that in the second column 
>(statement_template_id) I need to insert the actual value of the 
>sequence-item. But I can't use it in the dtml-call tag. When I print it in 
>the HTML table, the value is ok but I need to insert that value in the 
>statement_template_id.
>How can I get the sequence_item value to insert it in the table?
>
><dtml-in actual_boolean_value>
><td><tr>
><dtml-var actual_boolean_value><dtml-var sequence-item>
></td></tr>
><dtml-call "updateStatementValues(
>   checklist_id=_['checklist_id'],
>   statement_template_id=<dtml-var sequence-item>)">
></dtml-in>

You should learn about the "prefix" attribute of "dtml-in"
(--> Zope Book, online!) and that you *never* use DTML
inside expressions (you do not need it there!).

-- 
Dieter



More information about the Zope mailing list