[Zope] newbie question

Jenny Campbell jjc@eec.co.nz
Sun, 04 Jul 1999 09:45:42 +1200


Thanks for your help Tony/Bill

I'm making progress with this but have a few more questions:

1.      I've just worked out I need to pass two parameters to the second query
(branch and customer no). If I hardcode the branch no into the SQL method and
pass only the customer number  it works, but how do I pass both variables? I've
tried using a + and & between the two variables as below but no joy.

        <tr>
          <td><a href="linktest02?Branch=<!--#var
cu_branch-->&linktest02?Customer=<!--#var cu_customer-->"</a>
            <!--#var cu_branch null=""--> / <!--#var cu_customer null=""--></td>

          <td><!--#var cu_name null=""--></td>
          <td><!--#var cu_street_add3 null=""--></td>
        </tr>


2.     Tony - in your edit_me object :

       <!--#if staff_number-->
        <!--#in expr="find_staff_number(staff_number=staff_number)"-->

    I can't work out where the expr=find_staff_number ties into all the other
code, is it another separate query like find_staff?


3.    In the find_staff query:

    <!--#in expr="find_staff(search_field=search_type, search_item=search_term)"

    size=8 orphan=1 start=query_start-->

    Is "search_field=search_type, search_item=search_term" using named fields
from your database or is it just a general piece of code I can use as is?

Really appreciate your help as I've been given two weeks to put together a
demonstration intranet and I've never seen Zope (or anything else before) and
only have the User Guides for help. Major learning curve!! Thanks

Jenny







Tony McDonald wrote:

> > 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.
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://www.zope.org/mailman/listinfo/zope
>
> (For developer-specific issues, use the companion list,
> zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )

--
Jenny Campbell
User Support - Applications
Eastern Equities Limited
Ph: 06-876 7943  Fax: 06-876 8811

---------------------------------