Re: [WebDNA] sort parameters in search
This WebDNA talk-list message is from 2015
It keeps the original formatting.
numero = 111860
interpreted = N
texte = Thanks Matt. Yes, that's similar to the way I handle it, particulalry =when theres a listing with various sorts by clicking the header labels. =I like to use the previous sort as my second sort for such tables. =Anyway, the initial email was just a feature request; I have my =workarounds already. Then I put up the page out of curiosity as to what =happens when things aren't quite kosher with the sort parameters.TerryOn Jan 13, 2015, at 1:00 AM, "Psi Prime Inc, Matthew A Perosi" =
wrote:> I've been watching this thread with some curiosity.>=20> I think I understand the situation of needing to change the sorting =criteria for a search on the fly, but what I'm not sure of is if (A) the =signal for that criteria is triggered while the DB is being sifted =through, or (B) it the criteria is triggered before entering the =[search].>=20> I can't quite imagine the (A) scenario in WebDNA, although it sounds =like something you'd want to accomplish with an SQL join.>=20> On the other hand I deal with the (B) situation all the time, and this =is how I solve it:>=20> [text]__sortvar=3D[/text]> [text]__searchvar=3D[/text]> [showif [specialcase]=3Dt]> =[text]__sortvar=3D&FIELDAsort=3D1&FIELDBsort=3D2&FIELDCsort=3D3&FIELDDsort==3D4[/text]> [text]__searchvar=3D&eqFIELDAdata=3DA&eqFIELDBdata=3DB[/text]> [/showif]> [hideif [specialcase]=3Dt]> [text]__sortvar=3D&FIELDBsort=3D1&FIELDCsort=3D2&FIELDDsort=3D3[/text]> [text]__searchvar=3D&eqFIELDBdata=3DA&eqFIELDCdata=3DB[/text]> [/hideif]> [search db=3Dtest.db[__searchvar][__sortvar]]...[/search]>=20> Does this help?>=20> -Matthew Perosi>=20>=20>=20>=20>=20> On 1/12/2015 7:23 PM, Terry Wilson wrote:>> For those of you interested in the ramifications of deviating from =the prescribed sorting parameters in a search (or making typos), I made =up a little page to show what happens:>>=20>> http://terryfic.com/webdna/sort.html>>=20>>=20>> On Jan 12, 2015, at 8:59 AM, Terry Wilson wrote:>>=20>>> Thanks Donovan. As often happens when I go to ask a question, in =documenting the problem, I often discover the answer myself. In this =case, when I made my first reply to you, it dawned on me that this is =would not merely be a tweak, but an entirely different way of managing =the sort. So if it's not easy, maybe it's better that the WSC resources =be put to other uses like fixing the IPaddress format.>>>=20>>> But nevertheless, later today after I do my swim at the Y then take =my mother to lunch with some little old ladies, I'll throw together a =sample page.>>>=20>>> I like the dialog going on right now for feature requests and =enhancements.>>>=20>>> Sent from my iPad>>>=20>>>> On Jan 12, 2015, at 8:35 AM, Donovan Brooke =wrote:>>>>=20>>>> Off the top of my head, sorting =93childs=94 are supposed to apply =to sorted parent ranks.. meaning sort2 works on the ranked match set of =sort1.>>>>=20>>>> So.. if there is no sort1 ranked set=85 There could be a subtle =issue on what you describe, but I don=92t have the time to test right =now. The reason I am asking for a reproducible test set is that I =personally value your opinion and when you suggest something, I =personally listen. But I wouldn=92t want WSC to mess with Search unless =there is a clear understanding of the issue and the fix.>>>>=20>>>> Note, I=92m not working with WSC at this point, so I have no say =other than a being a passionate end-user of the language.>>>>=20>>>> Sincerely,>>>> Donovan>>>>=20>>>>=20>>>>=20>>>>=20>>>>=20>>>>> On Jan 12, 2015, at 10:16 AM, Terry Wilson =wrote:>>>>>=20>>>>> Also, it was a feature request, not a request to help with a =workaround. I already do that. Thanks though!>>>>>=20>>>>> Sent from my iPad>>>>>=20>>>>>> On Jan 12, 2015, at 7:57 AM, Donovan Brooke =wrote:>>>>>>=20>>>>>> Terry, I don=92t personally have much time these days to write =out my own test code for other peoples issues.>>>>>>=20>>>>>> However, I am trying to help. Maybe someone else can test this.>>>>>>=20>>>>>> Sincerely,>>>>>> Donovan>>>>>>=20>>>>>>=20>>>>>>=20>>>>>>=20>>>>>>> On Jan 12, 2015, at 9:55 AM, Terry Wilson =wrote:>>>>>>>=20>>>>>>> My guess is that sort1 is looked for, and if not found, no =further sorting is investigated. Likewise when there's no sort2, etc. =You can easily try this out on one of your own searches.>>>>>>>=20>>>>>>> Sent from my iPad>>>>>>>=20>>>>>>>> On Jan 12, 2015, at 7:12 AM, Donovan Brooke =wrote:>>>>>>>>=20>>>>>>>> Hi Terry,>>>>>>>>=20>>>>>>>> Are you saying later sort params get ignored if prior sort =params don=92t apply?>>>>>>>>=20>>>>>>>> Can you post a test template and your desired results?>>>>>>>>=20>>>>>>>> Donovan>>>>>>>>=20>>>>>>>>=20>>>>>>>>=20>>>>>>>>=20>>>>>>>>=20>>>>>>>>=20>>>>>>>>> On Jan 11, 2015, at 11:06 PM, Terry Wilson = wrote:>>>>>>>>>=20>>>>>>>>> I'd really to see the sort parameters in [search] sort =regardless of the specified number. How do I explain this.>>>>>>>>>=20>>>>>>>>> &fieldAsort=3D1&fieldBsort=3D2&fieldCsort=3D3&fieldDsort=3D4>>>>>>>>>=20>>>>>>>>> But I only need fieldA to lead the sort for one condition. So =unless that comes up, I just hide fieldAsort=3D1 like so:>>>>>>>>>=20>>>>>>>>> [showif =[specialcase]=3Dt]&fieldAsort=3D1[/showif]&fieldBsort=3D2&fieldCsort=3D3&f=ieldDsort=3D4>>>>>>>>>=20>>>>>>>>> This comes up from time to time, and actually right now it's =coming up for me again and as usual, I have to showif/hideif the entire =sort string for each condition instead of just slipping in the one that =I need for certain cases.>>>>>>>>>=20>>>>>>>>> [showif =[specialcase]=3Dt]&fieldAsort=3D1&fieldBsort=3D2&fieldCsort=3D3&fieldDsort==3D4[/showif]>>>>>>>>> [hideif =[specialcase]=3Dt]&fieldBsort=3D1&fieldCsort=3D2&fieldDsort=3D3[/hideif]>>>>>>>>>=20>>>>>>>>> kind of a pain in the ass when you're still deciding what to =best sort on - now you have 2 places to futz with as you refine.>>>>>>>>>=20>>>>>>>>> Bonus points to also let those numbers be decimal. Let's say =sometimes you need an additional sort in the middle. Throw a showif on =fieldZsort=3D2.5 as needed:>>>>>>>>>=20>>>>>>>>> =&fieldAsort=3D1&fieldBsort=3D2&fieldZsort=3D2.5&fieldCsort=3D3&fieldDsort=3D=4--------------------------------------------------------->>>>>>>>> This message is sent to you because you are subscribed to>>>>>>>>> the mailing list .>>>>>>>>> To unsubscribe, E-mail to: >>>>>>>>> archives: http://mail.webdna.us/list/talk@webdna.us>>>>>>>>> Bug Reporting: support@webdna.us>>>>>>>> --------------------------------------------------------->>>>>>>> This message is sent to you because you are subscribed to>>>>>>>> the mailing list .>>>>>>>> To unsubscribe, E-mail to: >>>>>>>> archives: http://mail.webdna.us/list/talk@webdna.us>>>>>>>> Bug Reporting: support@webdna.us>>>>>>> --------------------------------------------------------->>>>>>> This message is sent to you because you are subscribed to>>>>>>> the mailing list .>>>>>>> To unsubscribe, E-mail to: >>>>>>> archives: http://mail.webdna.us/list/talk@webdna.us>>>>>>> Bug Reporting: support@webdna.us>>>>>> --------------------------------------------------------->>>>>> This message is sent to you because you are subscribed to>>>>>> the mailing list .>>>>>> To unsubscribe, E-mail to: >>>>>> archives: http://mail.webdna.us/list/talk@webdna.us>>>>>> Bug Reporting: support@webdna.us>>>>> --------------------------------------------------------->>>>> This message is sent to you because you are subscribed to>>>>> the mailing list .>>>>> To unsubscribe, E-mail to: >>>>> archives: http://mail.webdna.us/list/talk@webdna.us>>>>> Bug Reporting: support@webdna.us>>>> --------------------------------------------------------->>>> This message is sent to you because you are subscribed to>>>> the mailing list .>>>> To unsubscribe, E-mail to: >>>> archives: http://mail.webdna.us/list/talk@webdna.us>>>> Bug Reporting: support@webdna.us>>> --------------------------------------------------------->>> This message is sent to you because you are subscribed to>>> the mailing list .>>> To unsubscribe, E-mail to: >>> archives: http://mail.webdna.us/list/talk@webdna.us>>> Bug Reporting: support@webdna.us>> --------------------------------------------------------->> This message is sent to you because you are subscribed to>> the mailing list .>> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us>> Bug Reporting: support@webdna.us>>=20>>=20>>=20>> --=20>> Matthew A Perosi>> Corporate Consultant>> Mobile Marketing Expert>> Senior Web Developer>> SEO Analyst & Educator>> matt@psiprime.com>>=20>> Psi Prime, Inc.>> 323 Union Blvd.>> Totowa, NJ 07512>>=20>> Direct: 888.872.0274>> Fax: 888.488.5924>>=20>> http://www.perosi.com> ---------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us> Bug Reporting: support@webdna.us
Associated Messages, from the most recent to the oldest:
Thanks Matt. Yes, that's similar to the way I handle it, particulalry =when theres a listing with various sorts by clicking the header labels. =I like to use the previous sort as my second sort for such tables. =Anyway, the initial email was just a feature request; I have my =workarounds already. Then I put up the page out of curiosity as to what =happens when things aren't quite kosher with the sort parameters.TerryOn Jan 13, 2015, at 1:00 AM, "Psi Prime Inc, Matthew A Perosi" = wrote:> I've been watching this thread with some curiosity.>=20> I think I understand the situation of needing to change the sorting =criteria for a search on the fly, but what I'm not sure of is if (A) the =signal for that criteria is triggered while the DB is being sifted =through, or (B) it the criteria is triggered before entering the =[search].>=20> I can't quite imagine the (A) scenario in WebDNA, although it sounds =like something you'd want to accomplish with an SQL join.>=20> On the other hand I deal with the (B) situation all the time, and this =is how I solve it:>=20> [text]__sortvar=3D[/text]> [text]__searchvar=3D[/text]> [showif [specialcase]=3Dt]> =[text]__sortvar=3D&FIELDAsort=3D1&FIELDBsort=3D2&FIELDCsort=3D3&FIELDDsort==3D4[/text]> [text]__searchvar=3D&eqFIELDAdata=3DA&eqFIELDBdata=3DB[/text]> [/showif]> [hideif [specialcase]=3Dt]> [text]__sortvar=3D&FIELDBsort=3D1&FIELDCsort=3D2&FIELDDsort=3D3[/text]> [text]__searchvar=3D&eqFIELDBdata=3DA&eqFIELDCdata=3DB[/text]> [/hideif]> [search db=3Dtest.db[__searchvar][__sortvar]]...[/search]>=20> Does this help?>=20> -Matthew Perosi>=20>=20>=20>=20>=20> On 1/12/2015 7:23 PM, Terry Wilson wrote:>> For those of you interested in the ramifications of deviating from =the prescribed sorting parameters in a search (or making typos), I made =up a little page to show what happens:>>=20>> http://terryfic.com/webdna/sort.html>>=20>>=20>> On Jan 12, 2015, at 8:59 AM, Terry Wilson wrote:>>=20>>> Thanks Donovan. As often happens when I go to ask a question, in =documenting the problem, I often discover the answer myself. In this =case, when I made my first reply to you, it dawned on me that this is =would not merely be a tweak, but an entirely different way of managing =the sort. So if it's not easy, maybe it's better that the WSC resources =be put to other uses like fixing the IPaddress format.>>>=20>>> But nevertheless, later today after I do my swim at the Y then take =my mother to lunch with some little old ladies, I'll throw together a =sample page.>>>=20>>> I like the dialog going on right now for feature requests and =enhancements.>>>=20>>> Sent from my iPad>>>=20>>>> On Jan 12, 2015, at 8:35 AM, Donovan Brooke =wrote:>>>>=20>>>> Off the top of my head, sorting =93childs=94 are supposed to apply =to sorted parent ranks.. meaning sort2 works on the ranked match set of =sort1.>>>>=20>>>> So.. if there is no sort1 ranked set=85 There could be a subtle =issue on what you describe, but I don=92t have the time to test right =now. The reason I am asking for a reproducible test set is that I =personally value your opinion and when you suggest something, I =personally listen. But I wouldn=92t want WSC to mess with Search unless =there is a clear understanding of the issue and the fix.>>>>=20>>>> Note, I=92m not working with WSC at this point, so I have no say =other than a being a passionate end-user of the language.>>>>=20>>>> Sincerely,>>>> Donovan>>>>=20>>>>=20>>>>=20>>>>=20>>>>=20>>>>> On Jan 12, 2015, at 10:16 AM, Terry Wilson =wrote:>>>>>=20>>>>> Also, it was a feature request, not a request to help with a =workaround. I already do that. Thanks though!>>>>>=20>>>>> Sent from my iPad>>>>>=20>>>>>> On Jan 12, 2015, at 7:57 AM, Donovan Brooke =wrote:>>>>>>=20>>>>>> Terry, I don=92t personally have much time these days to write =out my own test code for other peoples issues.>>>>>>=20>>>>>> However, I am trying to help. Maybe someone else can test this.>>>>>>=20>>>>>> Sincerely,>>>>>> Donovan>>>>>>=20>>>>>>=20>>>>>>=20>>>>>>=20>>>>>>> On Jan 12, 2015, at 9:55 AM, Terry Wilson =wrote:>>>>>>>=20>>>>>>> My guess is that sort1 is looked for, and if not found, no =further sorting is investigated. Likewise when there's no sort2, etc. =You can easily try this out on one of your own searches.>>>>>>>=20>>>>>>> Sent from my iPad>>>>>>>=20>>>>>>>> On Jan 12, 2015, at 7:12 AM, Donovan Brooke =wrote:>>>>>>>>=20>>>>>>>> Hi Terry,>>>>>>>>=20>>>>>>>> Are you saying later sort params get ignored if prior sort =params don=92t apply?>>>>>>>>=20>>>>>>>> Can you post a test template and your desired results?>>>>>>>>=20>>>>>>>> Donovan>>>>>>>>=20>>>>>>>>=20>>>>>>>>=20>>>>>>>>=20>>>>>>>>=20>>>>>>>>=20>>>>>>>>> On Jan 11, 2015, at 11:06 PM, Terry Wilson = wrote:>>>>>>>>>=20>>>>>>>>> I'd really to see the sort parameters in [search] sort =regardless of the specified number. How do I explain this.>>>>>>>>>=20>>>>>>>>> &fieldAsort=3D1&fieldBsort=3D2&fieldCsort=3D3&fieldDsort=3D4>>>>>>>>>=20>>>>>>>>> But I only need fieldA to lead the sort for one condition. So =unless that comes up, I just hide fieldAsort=3D1 like so:>>>>>>>>>=20>>>>>>>>> [showif =[specialcase]=3Dt]&fieldAsort=3D1[/showif]&fieldBsort=3D2&fieldCsort=3D3&f=ieldDsort=3D4>>>>>>>>>=20>>>>>>>>> This comes up from time to time, and actually right now it's =coming up for me again and as usual, I have to showif/hideif the entire =sort string for each condition instead of just slipping in the one that =I need for certain cases.>>>>>>>>>=20>>>>>>>>> [showif =[specialcase]=3Dt]&fieldAsort=3D1&fieldBsort=3D2&fieldCsort=3D3&fieldDsort==3D4[/showif]>>>>>>>>> [hideif =[specialcase]=3Dt]&fieldBsort=3D1&fieldCsort=3D2&fieldDsort=3D3[/hideif]>>>>>>>>>=20>>>>>>>>> kind of a pain in the ass when you're still deciding what to =best sort on - now you have 2 places to futz with as you refine.>>>>>>>>>=20>>>>>>>>> Bonus points to also let those numbers be decimal. Let's say =sometimes you need an additional sort in the middle. Throw a showif on =fieldZsort=3D2.5 as needed:>>>>>>>>>=20>>>>>>>>> =&fieldAsort=3D1&fieldBsort=3D2&fieldZsort=3D2.5&fieldCsort=3D3&fieldDsort=3D=4--------------------------------------------------------->>>>>>>>> This message is sent to you because you are subscribed to>>>>>>>>> the mailing list .>>>>>>>>> To unsubscribe, E-mail to: >>>>>>>>> archives: http://mail.webdna.us/list/talk@webdna.us>>>>>>>>> Bug Reporting: support@webdna.us>>>>>>>> --------------------------------------------------------->>>>>>>> This message is sent to you because you are subscribed to>>>>>>>> the mailing list .>>>>>>>> To unsubscribe, E-mail to: >>>>>>>> archives: http://mail.webdna.us/list/talk@webdna.us>>>>>>>> Bug Reporting: support@webdna.us>>>>>>> --------------------------------------------------------->>>>>>> This message is sent to you because you are subscribed to>>>>>>> the mailing list .>>>>>>> To unsubscribe, E-mail to: >>>>>>> archives: http://mail.webdna.us/list/talk@webdna.us>>>>>>> Bug Reporting: support@webdna.us>>>>>> --------------------------------------------------------->>>>>> This message is sent to you because you are subscribed to>>>>>> the mailing list .>>>>>> To unsubscribe, E-mail to: >>>>>> archives: http://mail.webdna.us/list/talk@webdna.us>>>>>> Bug Reporting: support@webdna.us>>>>> --------------------------------------------------------->>>>> This message is sent to you because you are subscribed to>>>>> the mailing list .>>>>> To unsubscribe, E-mail to: >>>>> archives: http://mail.webdna.us/list/talk@webdna.us>>>>> Bug Reporting: support@webdna.us>>>> --------------------------------------------------------->>>> This message is sent to you because you are subscribed to>>>> the mailing list .>>>> To unsubscribe, E-mail to: >>>> archives: http://mail.webdna.us/list/talk@webdna.us>>>> Bug Reporting: support@webdna.us>>> --------------------------------------------------------->>> This message is sent to you because you are subscribed to>>> the mailing list .>>> To unsubscribe, E-mail to: >>> archives: http://mail.webdna.us/list/talk@webdna.us>>> Bug Reporting: support@webdna.us>> --------------------------------------------------------->> This message is sent to you because you are subscribed to>> the mailing list .>> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us>> Bug Reporting: support@webdna.us>>=20>>=20>>=20>> --=20>> Matthew A Perosi>> Corporate Consultant>> Mobile Marketing Expert>> Senior Web Developer>> SEO Analyst & Educator>> matt@psiprime.com>>=20>> Psi Prime, Inc.>> 323 Union Blvd.>> Totowa, NJ 07512>>=20>> Direct: 888.872.0274>> Fax: 888.488.5924>>=20>> http://www.perosi.com> ---------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us> Bug Reporting: support@webdna.us
Terry Wilson
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
list items (1998)
WC2b15 File Corruption (1997)
[WebDNA] reply vs. new (2009)
Part Html part WebDNA (1997)
emailer on Windows Beta 18 (1997)
Multiple security dbs (1997)
[WebDNA] =?UTF-8?B?UmU6IFtXZWJETkFdIFJlOiBbV2ViRE5BXSBSZTogW1dlYkROQV0gUmU6IFtXZWJETkFdIA==?= (2011)
&FieldNametype=time unnecessary? (2000)
combine search (1998)
[WebDNA] talklist size... (2009)
Spell Check (2003)
Encyption mail was Suggestions for Topics ... (1998)
Closing Databases (1998)
math a various prices (1997)
problems with 2 tags shakur (1997)
Searching multiple fields from one form field (1997)
Showif, Hideif reverse logic ? (1997)
Upgrading old WebCat Database Files (1997)
[capitalize] (2005)
Re:Help name our technology! (1997)