[Zope] newbie question

Tony McDonald tony.mcdonald@ncl.ac.uk
Sat, 03 Jul 1999 08:52:44 +0100


> Hi all - hope you can help. I'm created several SQL Methods, the first
> of which returned a list of customers based on an string input value,
> and the second Method returns a list of transactions for those customers
> based on customer number.
>
> What I'm trying to do is once I done the  first query and have a
> customer list on my screen I want the each customer number to be a link
> which once clicked on will run the second query showing all the
> transactions for that specific customer. Is this possible?
>
> TIA
>
> Jenny

Definitely, this is from a system we have for displaying and editing staff
details.

index_html object:
find_staff is an SQL query:

<!--#in expr="find_staff(search_field=search_type, search_item=search_term)"
size=8 orphan=1 start=query_start-->

blah blah (staff_number is returned from the find_staff SQL method)
<a href="edit_me?staff_number=<!--#var staff_number-->">Edit Me</a>
blah

<!--#/in-->

***
edit_me object:

blah..., the 'if' statement is just so's find_staff_number doesn't complain.
<!--#if staff_number-->
<!--#in expr="find_staff_number(staff_number=staff_number)"-->

clever stuff, using the var's from the find_staff_number SQL method.
<!--#/in-->
<!--#/if-->

(replace 'staff' with 'transaction', add your own nice-looking HTML and
bingo!)

hth
Tone.