<!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> </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> </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> </div>
<div><dtml-call "REQUEST.set('RECORD_ID',
REQUEST.SESSION['RECORD_ID'])"><br>
<dtml-in lookup_students_in_course><br>
<dtml-call "REQUEST.set('student_id_temp', student_id)"><br>
</dtml-in></div>
<div><dtml-in expr="_.range(sequence-number)"><br>
<dtml-call "REQUEST.set('student_id_temp', student_id_temp)"><br>
<SELECT NAME="student_id_selected"><br>
<option value=""></option><br>
<dtml-in lookup_student_name sort=student_last_name><br>
<OPTION VALUE="<dtml-var student_id>"><br>
<dtml-var student_last_name>, <dtml-var
student_first_name> <br>
</OPTION><br>
</dtml-in><br>
</SELECT><br>
</dtml-in></div>
<div> </div>
<div>I am having a hard time find reference material on this.</div>
<div> </div>
<div>Thanks,</div>
<div> </div>
<div>Larry</div>
<!-- END WEBMAIL STATIONERY --></blockquote>
Larry,<br>
<br>
I have an idea for you. Rewrite in python. Its easy to return a html
<select> structure from a python scripts and python scripts are
so much easier to think thru than dtml. <br>
<br>
Then from your dtml (if i recall) you'd just <dtml-var
expr="yourPython()">. From tal use include the "structure" key word
like:<br>
<span tal:content="structure python:context.yourPython(params=
...) <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>