Re: [WebDNA] group searching not working as expected.

This WebDNA talk-list message is from

2010


It keeps the original formatting.
numero = 106063
interpreted = N
texte = Good point about group1 and group2 calling the same field. I'm not really understanding why you are wanting to use grouped fields. Are there checkboxes on the search form? If so, you could easily use formvariables with name=feeled1_Fruit, URL the values, and use a space as a delimiter, like Ken showed. i.e. [formvariables name=feeled1_Fruit][url][value][/url][/formvariables]. (If each checkbox has a different name, like feeled1_Fruit_1 etc, then just add &exact=f.) If the spaces get in the way, then sure, make it pipe delimited or something. But I think you're better off making a normal-style search with wofeeled1_Fruitdatarq=[formvariables name=feeled1_Fruit][url][value][/url][/formvariables]&eqfeeled3_HowUseddatarq=[url]baked dessert[/url] (Ken's solution, but without url'ing the space delimiter) than a workaround using grouped fields. By the way, California isn't the first place I think of when I think of blueberries. More like NJ, OR, MI. It's a big crop here in NJ where I live. Terry >Hi Terry > >Thanks for jumping in! >That is just what I had thought.. and so the reason I posted (when I >saw that the search then does not work the way we are thinking). >I.e. if I add 'rq' to those 2 group params/comparisons.. then the >search finds nothing, as opposed to finding the 2 records that I had >at first thought it would find. > >i.e. this: >[search db=my.db&group1field=feeled1_Fruit >&group2field=feeled1_Fruit&eqgroup1datarq=1apple&eqgroup2datarq=3cherry&wsfeeled3_HowUseddatarq=[URL]baked >dessert[/URL]&max=500] > >finds zero records. > >Now I can imagine how those results make sense (i.e. a search which >requires *everything*.. thus requires one field to have 2 different >values - which none do, thus zero records found).. but/and so my >question still remains: > >If you were coding this, how would you write the search so that it >finds ONLY record #1 & #3, *using grouped fields*? >(see my original post (OP) for the database content) > >Terry can you write a search *using grouped fields*.. which meets >this requirement: >> (I need to be able to tell the search to return records where: >> -[feeled3_HowUsed] = baked dessert, *AND* >> -[feeled1_Fruit] = (*either* "1apple" or "3cherry" or "4mango" >> >> ...which is only records #1 and #3.) > >? > >Thanks for chiming in! >-Govinda > >On Dec 29, 2010, at 9:24 AM, Terry Wilson wrote: > >> Coming in a little late to this, but Ken's adding rq is all >>that's needed. Without rq, unless there is only one search >>parameter, it will find anything that fits something. So you'd want >>to add that to all 3 parts of the search. Allreqd=t is not the same >>as adding rq to your search parameters. It means that each part of >>the search has to find something. >> >> >> On Tue, 28 Dec 2010 22:54:14 -0500 >> Govinda wrote: >>> Hi Ken >>> Thanks for that! >>> It does work... even without the "&allreqd=T&allblnk=T". (see >>>*note below.) >>> I need to check to be sure that none of my 'words' that I might >>>search for in the field (corresponding to the [feeled1_Fruit] >>>field in my example) might have a word-delimiting char in their >>>values.. (like a space char). If not, then I think what you >>>suggested will be OK. I wanted to do it the other way so that >>>regardless of what characters might be in the value, it would not >>>break. I guess if I find any word-break chars in real values.. >>>then I'll get creative with "wbrk" & "fbrk". >>> With regard to the grouped-field technique, I assume that the >>>moral of the story is that grouping fields only works when there >>>are no other field comparisons going on, other than the grouped >>>field(s). >>> *Side note: >>> Interesting that when I add 'allreqd=T' to my original search, like so: >>> [search db = my .db &group1field = feeled1_Fruit &group2field = >>>feeled1_Fruit &eqgroup1data >>>=1apple&eqgroup2data=3cherry&wsfeeled3_HowUseddatarq=[URL]baked >>>dessert[/URL]&allreqd=T&max=500] >>> ...it does not seem to have any effect at all. >>> Thanks again! >>> ------------ >>> Govinda >>> On Dec 28, 2010, at 10:24 PM, Kenneth Grome wrote: >>>> Have you tried this: >>>> &eqfeeled3_HowUseddatarq=[url]baked dessert[/url] >>>> &wofeeled1_Fruitdatarq=[url]1apple 3cherry 4mango[/url] >>>> &allreqd=T&allblnk=T&max=500 >>>> Sincerely, >>>> Kenneth Grome >>> --------------------------------------------------------- >>> 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 > >------------ >Govinda > > > > > > >--------------------------------------------------------- >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 | terry@terryfic.com | http://terryfic.com http://WhosComing.com - a simplified, affordable online reservation system http://TightJacket.com -- stylish protection for your laptop -------------------------------------------------------------------------- Attitude is the only difference between ordeal and adventure. Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] group searching not working as expected. (Govinda 2010)
  2. Re: [WebDNA] group searching not working as expected. (Terry Wilson 2010)
  3. Re: [WebDNA] group searching not working as expected. (Govinda 2010)
  4. Re: [WebDNA] group searching not working as expected. ("Terry Wilson" 2010)
  5. Re: [WebDNA] group searching not working as expected. (Govinda 2010)
  6. Re: [WebDNA] group searching not working as expected. (Kenneth Grome 2010)
  7. Re: [WebDNA] group searching not working as expected. (Govinda 2010)
  8. Re: [WebDNA] group searching not working as expected. (frank@cwolfe.com 2010)
  9. [WebDNA] group searching not working as expected. (Govinda 2010)
Good point about group1 and group2 calling the same field. I'm not really understanding why you are wanting to use grouped fields. Are there checkboxes on the search form? If so, you could easily use formvariables with name=feeled1_Fruit, URL the values, and use a space as a delimiter, like Ken showed. i.e. [formvariables name=feeled1_Fruit][url][value][/url][/formvariables]. (If each checkbox has a different name, like feeled1_Fruit_1 etc, then just add &exact=f.) If the spaces get in the way, then sure, make it pipe delimited or something. But I think you're better off making a normal-style search with wofeeled1_Fruitdatarq=[formvariables name=feeled1_Fruit][url][value][/url][/formvariables]&eqfeeled3_HowUseddatarq=[url]baked dessert[/url] (Ken's solution, but without url'ing the space delimiter) than a workaround using grouped fields. By the way, California isn't the first place I think of when I think of blueberries. More like NJ, OR, MI. It's a big crop here in NJ where I live. Terry >Hi Terry > >Thanks for jumping in! >That is just what I had thought.. and so the reason I posted (when I >saw that the search then does not work the way we are thinking). >I.e. if I add 'rq' to those 2 group params/comparisons.. then the >search finds nothing, as opposed to finding the 2 records that I had >at first thought it would find. > >i.e. this: >[search db=my.db&group1field=feeled1_Fruit >&group2field=feeled1_Fruit&eqgroup1datarq=1apple&eqgroup2datarq=3cherry&wsfeeled3_HowUseddatarq=[url]baked >dessert[/URL]&max=500] > >finds zero records. > >Now I can imagine how those results make sense (i.e. a search which >requires *everything*.. thus requires one field to have 2 different >values - which none do, thus zero records found).. but/and so my >question still remains: > >If you were coding this, how would you write the search so that it >finds ONLY record #1 & #3, *using grouped fields*? >(see my original post (OP) for the database content) > >Terry can you write a search *using grouped fields*.. which meets >this requirement: >> (I need to be able to tell the search to return records where: >> -[feeled3_HowUsed] = baked dessert, *AND* >> -[feeled1_Fruit] = (*either* "1apple" or "3cherry" or "4mango" >> >> ...which is only records #1 and #3.) > >? > >Thanks for chiming in! >-Govinda > >On Dec 29, 2010, at 9:24 AM, Terry Wilson wrote: > >> Coming in a little late to this, but Ken's adding rq is all >>that's needed. Without rq, unless there is only one search >>parameter, it will find anything that fits something. So you'd want >>to add that to all 3 parts of the search. Allreqd=t is not the same >>as adding rq to your search parameters. It means that each part of >>the search has to find something. >> >> >> On Tue, 28 Dec 2010 22:54:14 -0500 >> Govinda wrote: >>> Hi Ken >>> Thanks for that! >>> It does work... even without the "&allreqd=T&allblnk=T". (see >>>*note below.) >>> I need to check to be sure that none of my 'words' that I might >>>search for in the field (corresponding to the [feeled1_Fruit] >>>field in my example) might have a word-delimiting char in their >>>values.. (like a space char). If not, then I think what you >>>suggested will be OK. I wanted to do it the other way so that >>>regardless of what characters might be in the value, it would not >>>break. I guess if I find any word-break chars in real values.. >>>then I'll get creative with "wbrk" & "fbrk". >>> With regard to the grouped-field technique, I assume that the >>>moral of the story is that grouping fields only works when there >>>are no other field comparisons going on, other than the grouped >>>field(s). >>> *Side note: >>> Interesting that when I add 'allreqd=T' to my original search, like so: >>> [search db = my .db &group1field = feeled1_Fruit &group2field = >>>feeled1_Fruit &eqgroup1data >>>=1apple&eqgroup2data=3cherry&wsfeeled3_HowUseddatarq=[url]baked >>>dessert[/URL]&allreqd=T&max=500] >>> ...it does not seem to have any effect at all. >>> Thanks again! >>> ------------ >>> Govinda >>> On Dec 28, 2010, at 10:24 PM, Kenneth Grome wrote: >>>> Have you tried this: >>>> &eqfeeled3_HowUseddatarq=[url]baked dessert[/url] >>>> &wofeeled1_Fruitdatarq=[url]1apple 3cherry 4mango[/url] >>>> &allreqd=T&allblnk=T&max=500 >>>> Sincerely, >>>> Kenneth Grome >>> --------------------------------------------------------- >>> 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 > >------------ >Govinda > > > > > > >--------------------------------------------------------- >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 | terry@terryfic.com | http://terryfic.com http://WhosComing.com - a simplified, affordable online reservation system http://TightJacket.com -- stylish protection for your laptop -------------------------------------------------------------------------- Attitude is the only difference between ordeal and adventure. 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:

Toronto area? (1999) encrypt/decrypt - are docs correct?? (2002) WCS Newbie question (1997) [WebDNA] test (2009) Help name our technology! (1997) [convertChars] and HTML Tags (1997) Exclude by date - multiple (1997) OPEN MARKET PATENTS SOUND ECOMMERCE ALARM (1998) Running _every_ page through WebCat ? (1997) 100% CPU (2003) Migrating to NT (1997) WebCat2b12 - nesting [tags] (1997) apparent variable variable display? (2000) carrying values forward (1998) Emailer again (1997) stripping extra spaces from form fields (2000) [WebDNA] High-profile WebDNA sites? (2008) [WebDNA] Credit card processing (2012) Navigator Parsing (1997) Hiding URL ? (1998)