<html>
<!-- BEGIN WEBMAIL STATIONERY -->
<head></head>
<body>
<!-- WEBMAIL STATIONERY noneset -->
<DIV></DIV>
<P>Hi Jonathon,</P>
<P>&nbsp;</P>
<P>I will adjust my code. I have written some Python code but very simple tasks and would like to do more.&nbsp;I don't program that often. I work for a school system in Connecticut. So if you have an example of what your are talking about I am willing to try it. </P>
<P>&nbsp;</P>
<P>Thanks again,</P>
<P>&nbsp;</P>
<P>Larry<BR></P>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">-------------- Original message from "Jonathan" &lt;dev101@magma.ca&gt;: -------------- <BR><BR><BR>&gt; <SNIP><BR>&gt; ----- Original Message ----- <BR>&gt; From: larrymcdonnell@att.net <BR>&gt; To: zope@zope.org <BR>&gt; Sent: Thursday, July 13, 2006 4:03 PM <BR>&gt; Subject: [Zope] Creating and displaying lists <BR>&gt; <BR>&gt; I need to collect a list of student id numbers from one table so I can take <BR>&gt; this list, find them in another table, and display their names so their <BR>&gt; teachers can give them a score. <BR>&gt; <BR>&gt; I still like to use DTML but I do not know if I have the sequence-number in <BR>&gt; the proper format. This is what I have been playing with: <BR>&gt; <BR>&gt; <DTML-CALL REQUEST.SESSION[?RECORD_ID?])? ?REQUEST.set(?RECORD_ID?,><BR>&gt; <DTML-IN lookup_students_in_course><BR>&gt; <DTML-CALL student_id)? ?REQUEST.set(?student_id_temp?,><BR>&gt; </DTML-IN><
BR>&gt; <DTML-IN expr="_.range(sequence-number)"><BR>&gt; <DTML-CALL ?REQUEST.set(?student_id_temp?, student_id_temp)?><BR>&gt; <SELECT name=student_id_selected> &gt; <OPTION value="" selected></OPTION> &gt; <DTML-IN sort="student_last_name" lookup_student_name> &gt; <OPTION value="<dtml-var student_id>">&gt; <DTML-VAR student_last_name>, <DTML-VAR student_first_name> &gt;</OPTION> &gt; &gt;</SELECT> <BR>&gt; </DTML-IN><BR>&gt; <BR>&gt; </SNIP><BR>&gt; <BR>&gt; I think there is some confusion here. You should break this into 2 sections <BR>&gt; (and it would be much easier in a python script), but if you want to use <BR>&gt; dtml... <BR>&gt; <BR>&gt; The first section should build the list you are trying to display in the <BR>&gt; SELECT statement. It looks like you are trying to create a list of 'tuples' <BR>&gt; where each tuple consists of (id, lastname, firstname). I don't know where <BR>&gt; your data is coming from, but you could do something like: <BR>&gt; <BR>&gt; <DTML-CAL
L [])? ?REQUEST.set(?studentList?,># creates an empty list <BR>&gt; <BR>&gt; <IN loop some><BR>&gt; <DTML-CALL )? firstname) lastname, (id, ?studentList.append(># add one <BR>&gt; tuple (record) to the list <BR>&gt; <END loop of><BR>&gt; <BR>&gt; After you have built your list test it by displaying it: <DTML-VAR <BR>&gt; studentList&gt; to see if you have the right data in your list. <BR>&gt; <BR>&gt; You can then proceed to the next section where you are building your SELECT <BR>&gt; statements (warning: not tested and very ugly dtml) <BR>&gt; <BR>&gt; <SELECT size=1 name=student_id_selected> &gt; <DTML-IN studentList> &gt; <OPTION value="<dtml-var " selected _[?sequence-item?][0]?>" &gt; &gt; <DTML-VAR ?_[?sequence-item?][1]?>, <DTML-VAR <BR>&gt; "_['sequence-item'][2]"&gt; &gt;</OPTION> &gt; &gt;</SELECT> <BR>&gt; <BR>&gt; <BR>&gt; hth &amp; Good Luck <BR>&gt; <BR>&gt; <BR>&gt; Jonathan <BR>&gt; </BLOCKQUOTE>
<!-- END WEBMAIL STATIONERY -->

</body>
</html>