Re: [Zope] Creating and displaying lists
Hi Jonathon, I will adjust my code. I have written some Python code but very simple tasks and would like to do more. 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. Thanks again, Larry -------------- Original message from "Jonathan" <dev101@magma.ca>: --------------
----- Original Message ----- From: larrymcdonnell@att.net To: zope@zope.org Sent: Thursday, July 13, 2006 4:03 PM Subject: [Zope] Creating and displaying lists
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.
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:
, > > >
I think there is some confusion here. You should break this into 2 sections (and it would be much easier in a python script), but if you want to use dtml...
The first section should build the list you are trying to display in the SELECT statement. It looks like you are trying to create a list of 'tuples' where each tuple consists of (id, lastname, firstname). I don't know where your data is coming from, but you could do something like:
# creates an empty list
# add one tuple (record) to the list
After you have built your list test it by displaying it: > studentList> to see if you have the right data in your list.
You can then proceed to the next section where you are building your SELECT statements (warning: not tested and very ugly dtml)
" > > , > "_['sequence-item'][2]"> > > >
hth & Good Luck
Jonathan
There is a chapter in the Zope Book called 'Advanced Zope Scripting' which gives some good examples. You can also find useful python scripts at www.zopelabs.com Jonathan ----- Original Message ----- From: larrymcdonnell@att.net To: Jonathan ; zope@zope.org Sent: Friday, July 14, 2006 9:30 AM Subject: Re: [Zope] Creating and displaying lists Hi Jonathon, I will adjust my code. I have written some Python code but very simple tasks and would like to do more. 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. Thanks again, Larry -------------- Original message from "Jonathan" <dev101@magma.ca>: --------------
----- Original Message ----- From: larrymcdonnell@att.net To: zope@zope.org Sent: Thursday, July 13, 2006 4:03 PM Subject: [Zope] Creating and displaying lists
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.
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:
< BR>>
, > > >
I think there is some confusion here. You should break this into 2 sections (and it would be much easier in a python script), but if you want to use dtml...
The first section should build the list you are trying to display in the SELECT statement. It looks like you are trying to create a list of 'tuples' where each tuple consists of (id, lastname, firstname). I don't know where your data is coming from, but you could do something like:
# creates an empty list
# add one tuple (record) to the list
After you have built your list test it by displaying it: > studentList> to see if you have the right data in your list.
You can then proceed to the next section where you are building your SELECT statements (warning: not tested and very ugly dtml)
" > > , > "_['sequence-item'][2]"> > > >
hth & Good Luck
Jonathan
participants (2)
-
Jonathan -
larrymcdonnell@att.net