RE: [Zope] Newbie Question
Hi Lynn, I have cc'ed the group as I'm sure there are other thoughts on this out there. First Question: Once you have your ZSQL methods working, create a Z Search Interface to see how to create forms and result methods automagically. Their just plain DTML methods. Using the form and results DTML methods that the Z Search Interface generates, look at how it is setup to create your own DTML method containing three forms, each pointing to a different ZSQL method. Second Question: I imagine you could do something like putting the ZSQL method name in your database, and using them to refine your search? So your main form would call a ZSQL method that returns you data, and the names of four other ZSQL methods, perhaps sql_1, sql_2, sql_3, sql_4. Use these fields to make a <a href> link on the results of the first ZSQL, so you can click result 4, for example, and it executes sql_4. Third Question: Are your labels stored in the database? If so, just call those columns as the name. If not, you may be able to do something like <dtml-if expr="result_1 == '1'>USE</dtml-if>. Python is probably a better tool here. -Scott -----Original Message----- From: Lynn Mayes [mailto:LMayes@advpol.com] Sent: Friday, November 02, 2001 3:04 PM To: 'Meilicke, Scott' Subject: RE: [Zope] Newbie Question Hi Meilicke, I gave it a shot - but I keep getting either key errors, or can't submit a string into an in tag. Anyway, specifically here - I have already created an outer join query from 2 tables - the query is actually a ZSQL Method select query. It works fine. I also have created 3 separate ZSQL Methods querying 3 different ZSQL Methods - they all work individually. What I want to do is have all 3 queries on an interface of somekind, so when they pull up the page, they click on whichever search they would like to do. Also, I would like to know how to put another ZSQL method into the query results page - do you know how? Like query A spits out data 1-4, and on the results page, I want to further look at item 4. Lastly, I have data on the SQL tables that came from an Access form option box, items 1-4. All that show up in the table is the numerical value. Within the ZSQL method, I would like change change the 1 to say "USE" . Do you know how this would work? Thanx again, Lynn Mayes -----Original Message----- From: Meilicke, Scott [mailto:scott.meilicke@intp.com] Sent: Friday, November 02, 2001 1:15 PM To: 'Lynn Mayes'; 'Zope@zope.org' Subject: RE: [Zope] Newbie Question Within a DTML method, I have two forms, each having their action point to back to itself - the DTML method. The query to execute is determined by a dtml-if statement, looking for the NAME from the form. The DTML method id is 'atp_search' <FORM METHOD="GET" ACTION="atp_search"> Enter any character to search by Model #: <INPUT TYPE="Text" NAME="model"> <INPUT TYPE="Submit" VALUE="Go!"> </FORM> <!-- PN search --> <FORM METHOD="GET" ACTION="atp_search"> Enter any character to search by Mfg Part #: <INPUT TYPE="Text" NAME="mfg" > <INPUT TYPE="Submit" VALUE="Go!"> </FORM> <dtml-if model> <dtml-in atp_model size=50 start=query_start> display stuff from the atp_model ZSQL query </dtml-in> </dtml-if> <dtml-if mfg> <dtml-in atp_mfg size=50 start=query_start> display different stuff from the atp_mfg ZSQL query </dtml-in> </dtml-if> -Scott -----Original Message----- From: Lynn Mayes [mailto:LMayes@advpol.com] Sent: Friday, November 02, 2001 1:08 PM To: 'Zope@zope.org' Subject: [Zope] Newbie Question Hi there, Looked through many archived mailing lists, and I don't see specifally what I want - or I didn't look in the right place. In any case, if this is an old question, please forgive me. Couple of things: 1) Working with SQL tables through Zope - Have created queries, and they work fine. However, I would like to create one area (DTML method), where I can have 3 different submit buttons, querying 3 different queries - I am sure this is possible, I just am not too sure how, as this is still new to me. Want to have the user be able to pick what ever he/she wants to query from one location. 2) If I run query A, I get results, but when I try to edit the results page, I can't. I need to edit the query results page, how do I do this? 3) In the SQL table, I have values 1-4 from a option box in an Access from. I want to substitue the 1 for the word use in the query results - how do I do this? Thanx so much for your time. Sincerely, Lynn Mayes _______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (1)
-
Meilicke, Scott