<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<a class="moz-txt-link-abbreviated" href="mailto:larrymcdonnell@att.net">larrymcdonnell@att.net</a> wrote:
<blockquote
 cite="mid071320062003.22439.44B6A72200003DED000057A7216037602104040A0202010B0C0304@att.net"
 type="cite"><!-- BEGIN WEBMAIL STATIONERY -->
<!-- WEBMAIL STATIONERY noneset -->
  <div>Hi,</div>
  <div>&nbsp;</div>
  <div>I need to collect a list of student id numbers from one table so
I can take this list, find them in another table, and display their
names so their teachers can give them a score.</div>
  <div>&nbsp;</div>
  <div>I still like to use DTML but I do not know if I have the
sequence-number in the proper format. This is what I have been playing
with:</div>
  <div>&nbsp;</div>
  <div>&lt;dtml-call "REQUEST.set('RECORD_ID',
REQUEST.SESSION['RECORD_ID'])"&gt;<br>
&lt;dtml-in lookup_students_in_course&gt;<br>
&nbsp; &lt;dtml-call "REQUEST.set('student_id_temp', student_id)"&gt;<br>
&lt;/dtml-in&gt;</div>
  <div>&lt;dtml-in expr="_.range(sequence-number)"&gt;<br>
&nbsp; &lt;dtml-call "REQUEST.set('student_id_temp', student_id_temp)"&gt;<br>
&lt;SELECT NAME="student_id_selected"&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;option value=""&gt;&lt;/option&gt;<br>
&nbsp;&lt;dtml-in lookup_student_name sort=student_last_name&gt;<br>
&nbsp;&nbsp; &lt;OPTION VALUE="&lt;dtml-var student_id&gt;"&gt;<br>
&nbsp;&nbsp; &lt;dtml-var student_last_name&gt;, &lt;dtml-var
student_first_name&gt; <br>
&nbsp;&nbsp; &lt;/OPTION&gt;<br>
&nbsp;&lt;/dtml-in&gt;<br>
&lt;/SELECT&gt;<br>
&lt;/dtml-in&gt;</div>
  <div>&nbsp;</div>
  <div>I am having a hard time find reference material on this.</div>
  <div>&nbsp;</div>
  <div>Thanks,</div>
  <div>&nbsp;</div>
  <div>Larry</div>
<!-- END WEBMAIL STATIONERY --></blockquote>
Larry,<br>
<br>
I have an idea for you.&nbsp; Rewrite in python.&nbsp; Its easy to return a html
&lt;select&gt; structure from a python scripts and python scripts are
so much easier to think thru than dtml.&nbsp; <br>
<br>
Then from your dtml (if i recall)&nbsp; you'd just &lt;dtml-var
expr="yourPython()"&gt;.&nbsp; From tal use include the "structure" key word
like:<br>
&lt;span tal:content="structure python:context.yourPython(params=
...)&nbsp;&nbsp; <br>
<br>
If you get stuck re-ask (but give your version in python code)<span
 class="moz-smiley-s1"><span> :-) </span></span><br>
<br>
David<br>
<br>
</body>
</html>