Re: [WebDNA] sort parameters in search

This WebDNA talk-list message is from

2015


It keeps the original formatting.
numero = 111859
interpreted = N
texte = I've been watching this thread with some curiosity. 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]. I can't quite imagine the (A) scenario in WebDNA, although it sounds like something you'd want to accomplish with an SQL join. On the other hand I deal with the (B) situation all the time, and this is how I solve it: [text]__sortvar=[/text] [text]__searchvar=[/text] [showif [specialcase]=t] [text]__sortvar=&FIELDAsort=1&FIELDBsort=2&FIELDCsort=3&FIELDDsort=4[/text] [text]__searchvar=&eqFIELDAdata=A&eqFIELDBdata=B[/text] [/showif] [hideif [specialcase]=t] [text]__sortvar=&FIELDBsort=1&FIELDCsort=2&FIELDDsort=3[/text] [text]__searchvar=&eqFIELDBdata=A&eqFIELDCdata=B[/text] [/hideif] [search db=test.db[__searchvar][__sortvar]]...[/search] Does this help? -Matthew Perosi 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: > > http://terryfic.com/webdna/sort.html > > > On Jan 12, 2015, at 8:59 AM, Terry Wilson wrote: > >> 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. >> >> 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. >> >> I like the dialog going on right now for feature requests and enhancements. >> >> Sent from my iPad >> >>> On Jan 12, 2015, at 8:35 AM, Donovan Brooke wrote: >>> >>> Off the top of my head, sorting “childs” are supposed to apply to sorted parent ranks.. meaning sort2 works on the ranked match set of sort1. >>> >>> So.. if there is no sort1 ranked set… There could be a subtle issue on what you describe, but I don’t 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’t want WSC to mess with Search unless there is a clear understanding of the issue and the fix. >>> >>> Note, I’m not working with WSC at this point, so I have no say other than a being a passionate end-user of the language. >>> >>> Sincerely, >>> Donovan >>> >>> >>> >>> >>> >>>> On Jan 12, 2015, at 10:16 AM, Terry Wilson wrote: >>>> >>>> Also, it was a feature request, not a request to help with a workaround. I already do that. Thanks though! >>>> >>>> Sent from my iPad >>>> >>>>> On Jan 12, 2015, at 7:57 AM, Donovan Brooke wrote: >>>>> >>>>> Terry, I don’t personally have much time these days to write out my own test code for other peoples issues. >>>>> >>>>> However, I am trying to help. Maybe someone else can test this. >>>>> >>>>> Sincerely, >>>>> Donovan >>>>> >>>>> >>>>> >>>>> >>>>>> On Jan 12, 2015, at 9:55 AM, Terry Wilson wrote: >>>>>> >>>>>> 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. >>>>>> >>>>>> Sent from my iPad >>>>>> >>>>>>> On Jan 12, 2015, at 7:12 AM, Donovan Brooke wrote: >>>>>>> >>>>>>> Hi Terry, >>>>>>> >>>>>>> Are you saying later sort params get ignored if prior sort params don’t apply? >>>>>>> >>>>>>> Can you post a test template and your desired results? >>>>>>> >>>>>>> Donovan >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>>> On Jan 11, 2015, at 11:06 PM, Terry Wilson wrote: >>>>>>>> >>>>>>>> I'd really to see the sort parameters in [search] sort regardless of the specified number. How do I explain this. >>>>>>>> >>>>>>>> &fieldAsort=1&fieldBsort=2&fieldCsort=3&fieldDsort=4 >>>>>>>> >>>>>>>> But I only need fieldA to lead the sort for one condition. So unless that comes up, I just hide fieldAsort=1 like so: >>>>>>>> >>>>>>>> [showif [specialcase]=t]&fieldAsort=1[/showif]&fieldBsort=2&fieldCsort=3&fieldDsort=4 >>>>>>>> >>>>>>>> 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. >>>>>>>> >>>>>>>> [showif [specialcase]=t]&fieldAsort=1&fieldBsort=2&fieldCsort=3&fieldDsort=4[/showif] >>>>>>>> [hideif [specialcase]=t]&fieldBsort=1&fieldCsort=2&fieldDsort=3[/hideif] >>>>>>>> >>>>>>>> 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. >>>>>>>> >>>>>>>> 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=2.5 as needed: >>>>>>>> >>>>>>>> &fieldAsort=1&fieldBsort=2&fieldZsort=2.5&fieldCsort=3&fieldDsort=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 > > > > -- > Matthew A Perosi > Corporate Consultant > Mobile Marketing Expert > Senior Web Developer > SEO Analyst & Educator > matt@psiprime.com > > Psi Prime, Inc. > 323 Union Blvd. > Totowa, NJ 07512 > > Direct: 888.872.0274 > Fax: 888.488.5924 > > http://www.perosi.com Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] sort parameters in search (Donovan Brooke 2015)
  2. Re: [WebDNA] sort parameters in search (Terry Wilson 2015)
  3. Re: [WebDNA] sort parameters in search ("Psi Prime Inc, Matthew A Perosi " 2015)
  4. Re: [WebDNA] sort parameters in search (Terry Wilson 2015)
  5. Re: [WebDNA] sort parameters in search (Terry Wilson 2015)
  6. Re: [WebDNA] sort parameters in search (Donovan Brooke 2015)
  7. Re: [WebDNA] sort parameters in search (Terry Wilson 2015)
  8. Re: [WebDNA] sort parameters in search (Terry Wilson 2015)
  9. Re: [WebDNA] sort parameters in search (Terry Wilson 2015)
  10. Re: [WebDNA] sort parameters in search (Donovan Brooke 2015)
  11. Re: [WebDNA] sort parameters in search (Terry Wilson 2015)
  12. Re: [WebDNA] sort parameters in search (Donovan Brooke 2015)
  13. [WebDNA] sort parameters in search (Terry Wilson 2015)
I've been watching this thread with some curiosity. 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]. I can't quite imagine the (A) scenario in WebDNA, although it sounds like something you'd want to accomplish with an SQL join. On the other hand I deal with the (B) situation all the time, and this is how I solve it: [text]__sortvar=[/text] [text]__searchvar=[/text] [showif [specialcase]=t] [text]__sortvar=&FIELDAsort=1&FIELDBsort=2&FIELDCsort=3&FIELDDsort=4[/text] [text]__searchvar=&eqFIELDAdata=A&eqFIELDBdata=B[/text] [/showif] [hideif [specialcase]=t] [text]__sortvar=&FIELDBsort=1&FIELDCsort=2&FIELDDsort=3[/text] [text]__searchvar=&eqFIELDBdata=A&eqFIELDCdata=B[/text] [/hideif] [search db=test.db[__searchvar][__sortvar]]...[/search] Does this help? -Matthew Perosi 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: > > http://terryfic.com/webdna/sort.html > > > On Jan 12, 2015, at 8:59 AM, Terry Wilson wrote: > >> 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. >> >> 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. >> >> I like the dialog going on right now for feature requests and enhancements. >> >> Sent from my iPad >> >>> On Jan 12, 2015, at 8:35 AM, Donovan Brooke wrote: >>> >>> Off the top of my head, sorting “childs” are supposed to apply to sorted parent ranks.. meaning sort2 works on the ranked match set of sort1. >>> >>> So.. if there is no sort1 ranked set… There could be a subtle issue on what you describe, but I don’t 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’t want WSC to mess with Search unless there is a clear understanding of the issue and the fix. >>> >>> Note, I’m not working with WSC at this point, so I have no say other than a being a passionate end-user of the language. >>> >>> Sincerely, >>> Donovan >>> >>> >>> >>> >>> >>>> On Jan 12, 2015, at 10:16 AM, Terry Wilson wrote: >>>> >>>> Also, it was a feature request, not a request to help with a workaround. I already do that. Thanks though! >>>> >>>> Sent from my iPad >>>> >>>>> On Jan 12, 2015, at 7:57 AM, Donovan Brooke wrote: >>>>> >>>>> Terry, I don’t personally have much time these days to write out my own test code for other peoples issues. >>>>> >>>>> However, I am trying to help. Maybe someone else can test this. >>>>> >>>>> Sincerely, >>>>> Donovan >>>>> >>>>> >>>>> >>>>> >>>>>> On Jan 12, 2015, at 9:55 AM, Terry Wilson wrote: >>>>>> >>>>>> 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. >>>>>> >>>>>> Sent from my iPad >>>>>> >>>>>>> On Jan 12, 2015, at 7:12 AM, Donovan Brooke wrote: >>>>>>> >>>>>>> Hi Terry, >>>>>>> >>>>>>> Are you saying later sort params get ignored if prior sort params don’t apply? >>>>>>> >>>>>>> Can you post a test template and your desired results? >>>>>>> >>>>>>> Donovan >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>>> On Jan 11, 2015, at 11:06 PM, Terry Wilson wrote: >>>>>>>> >>>>>>>> I'd really to see the sort parameters in [search] sort regardless of the specified number. How do I explain this. >>>>>>>> >>>>>>>> &fieldAsort=1&fieldBsort=2&fieldCsort=3&fieldDsort=4 >>>>>>>> >>>>>>>> But I only need fieldA to lead the sort for one condition. So unless that comes up, I just hide fieldAsort=1 like so: >>>>>>>> >>>>>>>> [showif [specialcase]=t]&fieldAsort=1[/showif]&fieldBsort=2&fieldCsort=3&fieldDsort=4 >>>>>>>> >>>>>>>> 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. >>>>>>>> >>>>>>>> [showif [specialcase]=t]&fieldAsort=1&fieldBsort=2&fieldCsort=3&fieldDsort=4[/showif] >>>>>>>> [hideif [specialcase]=t]&fieldBsort=1&fieldCsort=2&fieldDsort=3[/hideif] >>>>>>>> >>>>>>>> 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. >>>>>>>> >>>>>>>> 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=2.5 as needed: >>>>>>>> >>>>>>>> &fieldAsort=1&fieldBsort=2&fieldZsort=2.5&fieldCsort=3&fieldDsort=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 > > > > -- > Matthew A Perosi > Corporate Consultant > Mobile Marketing Expert > Senior Web Developer > SEO Analyst & Educator > matt@psiprime.com > > Psi Prime, Inc. > 323 Union Blvd. > Totowa, NJ 07512 > > Direct: 888.872.0274 > Fax: 888.488.5924 > > http://www.perosi.com "Psi Prime Inc, Matthew A Perosi "

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:

Looking up two prices in database? (1997) Playin Tricks (2006) random images (1997) [WebDNA] Cheers (2008) Using a database with a short url (2000) Include Files (1998) WebCat2b13MacPlugIn - [showif][search][/showif] (1997) How do I get Google to crawl a WebCat site? (2003) [WebDNA] Clean URLS job - will pay (2010) More on ShippingCost help needed (1998) WebCatalog Hosting (1996) Founditems Add/remove graphic display problem (1999) Databases inside [SHOWIF] (1998) shell question (2004) [WebDNA] maybe silly suggestion? [founditems] (2015) WebDNA Book? (2003) The Solution to RE: Unexceling (was I need a smart quote...) (1999) WebCat editing, SiteGuard & SiteEdit (1997) Nav. 4 probs with cart - Serious problem (1997) searchable list archive (1997)