Thank you Alan for all of your help!!! That did it.... Have a great weekend!!
Cecilia C. Cos Database Analyst -----Original Message----- From: Alan Wolfe [mailto:[EMAIL PROTECTED] Sent: Friday, August 06, 2004 11:46 AM To: [EMAIL PROTECTED] Subject: Re: Witango-Talk: Sort on the Fly Yep, simple fixes for both issues on the results page you have all your hidden _op args but you are missing the data args. what i mean is on the results page you have a hidden arg for PELog_IssueDate_op but not one for PELog_IssueDate so when you resort, it isn't resending the date the user put in. It looks like you are missing all args except the _op args. also at the top of your results page you need to add... <@if expr="<@arg orderby>!=''"> <@sort array=local$resultset cols="<@arg orderby>"> </@if> that is the code that actualy does the sorting. It looks like after that it should work for you ::crosses fingers:: (: ----- Original Message ----- From: "Cecilia Cos" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, August 06, 2004 7:25 AM Subject: RE: Witango-Talk: Sort on the Fly Hi Alan, Thanks!!! This is much easier...I have done as you wrote below, but when I click on a header, it is not passing all of the arguments...so if I do an initial search for Issue Date=3/29/04 I get 35 results. When I click on Select# header to resort, it returns all 105 records and it doesn't sort properly..... I must have something missing.... Enclosed is the taf...perhaps you will see what I have missing.... Thanks. Cecilia C. Cos Database Analyst -----Original Message----- From: Alan Wolfe [mailto:[EMAIL PROTECTED] Sent: Thursday, August 05, 2004 5:22 PM To: [EMAIL PROTECTED] Subject: Re: Witango-Talk: Sort on the Fly yeah, there is an easier way luckily! (: right above this line: <H3>Click on the Select # to Modify/Delete</H3> put this: <form name=thisform method=post> and after the </body> tag at the bottom put </form> then, anywhere inside the form, put all your search arguments as hidden arguments, ie do this for all your search arguments: <input type=hidden name=PELog_SubKey_op value="<@arg PELog_SubKey_op>"> then instead of making the sortable header links like this: <a href="<@appfile>?_function=list&orderby=2"><B>ID</B></a> make them like this: <a href="" onClick="document.forms['thisform'].action='<@appfile>?_function=list&orde rb y=2';document.forms['thisform'].submit();return false;"><B>ID</B></a> what that will do is make it so when you click the link, it will submit the form, sending all arguments, including the hidden arguments that describe the search arguments. Still, if there are 50 search arguments you will have to make 50 hidden args but you only have to do it in one place, instead of include it in each sortable header link. ----- Original Message ----- From: "Cecilia Cos" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, August 05, 2004 1:35 PM Subject: RE: Witango-Talk: Sort on the Fly So if I have 50 search arguments, I have to include all 50 in each link???? Wow, that seems awfully complicated....there isn't an easier way?? What about if I use the direct dbms?? Cecilia C. Cos Database Analyst -----Original Message----- From: Alan Wolfe [mailto:[EMAIL PROTECTED] Sent: Thursday, August 05, 2004 4:18 PM To: [EMAIL PROTECTED] Subject: Re: Witango-Talk: Sort on the Fly instead of <a href="<@appfile>_function=list?orderby=2"><B>ID</B></a> you need <a href="<@appfile>?_function=list&orderby=2"><B>ID</B></a> then it should work. note that there is a seperate issue here too: since your using a search builder, you are going to need to pass the arguments of the search back to the list function again so it can redo the search based on the parameters the user input. what i mean is like you have an argument from the search form called "PELog_SubKey_op", so in your link where you send the orderby argument you are going to have to include "PELog_SubKey_op=<@arg PELog_SubKey_op>" in your link as well. you'll have to do that for all arguments that the search depends on. ----- Original Message ----- From: "Cecilia Cos" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, August 05, 2004 12:44 PM Subject: RE: Witango-Talk: Sort on the Fly Hi Alan, Attached is a copy of my taf.... I get the following 2 responses If I put this in the header, <a href="<@appfile>_function=list?orderby=2"><B>ID</B></a> The page cannot be found... If I put this in the header, <a href="<@appfile>?orderby=4"><B>Photo Editor Login</B></a> It puts me back in the search form... Any thoughts? Do I have to do this in a Direct DBMS? What I have done is a Search Builder without the Details....so that everything is listed (sort of like an excel sheet) in the results. Note that I have 9 tables joined. Again, Thanks. Cecilia C. Cos Database Analyst -----Original Message----- From: Alan Wolfe [mailto:[EMAIL PROTECTED] Sent: Thursday, August 05, 2004 3:02 PM To: [EMAIL PROTECTED] Subject: Re: Witango-Talk: Sort on the Fly You bet, here's a taf that has both methods in it. let me know if theres any part of it that doesnt make sense and i can explain (: ----- Original Message ----- From: "Cecilia Cos" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, August 05, 2004 11:22 AM Subject: RE: Witango-Talk: Sort on the Fly Hi Alan, Thanks this is very helpful.... Just one question.... I am not sure what you mean by >>>> Another way would be to check out the <@sort> tag, after you selected the data you want to display into a variable you would have some code like this: <@if expr="<@arg orderby>!=''"> <@sort array=local$mydata cols="<@arg orderby>"> </@if> <<<<< Can you give me an example? Thanks, Cecilia C. Cos Database Analyst -----Original Message----- From: Alan Wolfe [mailto:[EMAIL PROTECTED] Sent: Thursday, August 05, 2004 2:00 PM To: [EMAIL PROTECTED] Subject: Re: Witango-Talk: Sort on the Fly Hey Cecilia, If you are using Direct DBMS actions, you can pass the column to sort by as an post or search arg and use it in the Direct DBMS. what i mean is in your DBMS have sql like this: select * from table <@if expr="<@arg orderby>!=''">order by <@arg orderby></@if> and then have your table headers be links like this... <a href="<@appfile>?orderby=Field1">Field1</a> so that way when they click the link, it'll pass the arg and it'll be used in the sql. Another way would be to check out the <@sort> tag, after you selected the data you want to display into a variable you would have some code like this: <@if expr="<@arg orderby>!=''"> <@sort array=local$mydata cols="<@arg orderby>"> </@if> and then your table headers would be links like this... <a href="<@appfile>?orderby=2">Field2</a> hope that helps! ----- Original Message ----- From: "Cecilia Cos" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, August 05, 2004 10:37 AM Subject: Witango-Talk: Sort on the Fly > Is there an easy way of allowing the users to sort the record list > results on the fly? > > For instance if I have in my results.... > > Field 1 Field 2 Field 3 > Yes a 1 > No d 5 > No e 2 > Etc...... > > Assuming that the default sort is by Field 1. What would would be the > easiest and most efficient way to allow the users to click on the > Field 2 header and have it resort or then click on Field 3 header and > have it resort? > > Any thoughts would be greatly appreciated. > > Thanks in advance. > > Cecilia C. Cos > Database Analyst > > ______________________________________________________________________ > __ > TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf ________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf ________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf ________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf ________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf ________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf ________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf ________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf ________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf ________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf ________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
