Re: Searching for (field1 OR field2) AND field3

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 26955
interpreted = N
texte = At 11:04 PM -0600 2000/02/02, Bob Minor wrote:>On 2/2/00 9:12 PM, Chuck Rice wrote: > >>I tried that, but it did not help. I guess I should have explained that I >>have >>four columns in the database (the 4 tree fields) and I want to be able to >>select any or all of the columns to search, AND select any of the other >>fields to search on. -Chuck- > >I don't think you are attacking it right. > >What are you searching for in those fields. > >Explain the form and function in english, then we can try to make it >happen. > >I assume you want to be able to search the Rtree, the Htree, Ctree and >Ptree fields for some value. if R is checked then search Rtree, if H is >checked then Htree etc.... Is this correct? >Sorry, it is kind of hard to explain. There are 4 tree columns in the database. Each record will have one value in at least one of the columns and may have a value in 2, 3 or 4 columns. I want to be able to search only records that have data in one of the checkbox selected columns, ignoring records that have nulls ([blank]) in the checked column. at the same time, I want to search other columns for things link names and dates.So if checkbox 1 and 3 are checked, then I want to say: if ((tree1 NE [blank] OR tree3 NE blank) AND (First EQ Trevor)) then show the record.likewise, if only checkbox 2 is checked, then I want to say: if ((tree1 NE [blank]) AND (Last EQ Trevor)) then show the record.I found several problems with the code I posted earlier, so here is the revised form:>
> > > > > >Search: > >Rice
>Higdon
>Cox
>Polansky
> > > > >Last: >First: >Address: >City: >State: >Zip: >HPhone: >Birthday: >Email: >Website: > > > > > >
Putting a display of the formvariables in RESULTS.TPL, I get:>&max=5 >&allreqd=T >&Tree1=neRtreedata >&Tree2=neHtreedata >&Tree3=neCtreedata >&Tree4=nePtreedata >&group1field=%5B_Tree3%5D >&negroup1data=%5Bblank%5D >&Lastdata= >&Firstdata=Trevor >&Addressdata= >&Citydata= >&Statedata= >&Zipdata= >&HPhonedata= >&Birthdaydata= >&Emaildata= >&Websitedata=As you see, Tree3 did not get substituted. Hope this explains it better. Like I said, it is a bit hard to put into a short number of words. I think that I need to be setting the groupfield in the Results page, but if I do that, then it is not in the formvariables and other things will break. -Chuck-__________________________________________________________________________ Chuck Rice ------------------------------------------------------------- Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server. To end your Mail problems go to .This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Associated Messages, from the most recent to the oldest:

    
  1. Re: Searching for (field1 OR field2) AND field3 (Chuck Rice 2000)
  2. Re: Searching for (field1 OR field2) AND field3 (Chuck Rice 2000)
  3. Re: Searching for (field1 OR field2) AND field3 (Bob Minor 2000)
  4. Re: Searching for (field1 OR field2) AND field3 (Chuck Rice 2000)
  5. Re: Searching for (field1 OR field2) AND field3 (Bob Minor 2000)
  6. Re: Searching for (field1 OR field2) AND field3 (Chuck Rice 2000)
  7. Re: Searching for (field1 OR field2) AND field3 (Bob Minor 2000)
  8. Searching for (field1 OR field2) AND field3 (Chuck Rice 2000)
At 11:04 PM -0600 2000/02/02, Bob Minor wrote:>On 2/2/00 9:12 PM, Chuck Rice wrote: > >>I tried that, but it did not help. I guess I should have explained that I >>have >>four columns in the database (the 4 tree fields) and I want to be able to >>select any or all of the columns to search, AND select any of the other >>fields to search on. -Chuck- > >I don't think you are attacking it right. > >What are you searching for in those fields. > >Explain the form and function in english, then we can try to make it >happen. > >I assume you want to be able to search the Rtree, the Htree, Ctree and >Ptree fields for some value. if R is checked then search Rtree, if H is >checked then Htree etc.... Is this correct? >Sorry, it is kind of hard to explain. There are 4 tree columns in the database. Each record will have one value in at least one of the columns and may have a value in 2, 3 or 4 columns. I want to be able to search only records that have data in one of the checkbox selected columns, ignoring records that have nulls ([blank]) in the checked column. at the same time, I want to search other columns for things link names and dates.So if checkbox 1 and 3 are checked, then I want to say: if ((tree1 NE [blank] OR tree3 NE blank) AND (First EQ Trevor)) then show the record.likewise, if only checkbox 2 is checked, then I want to say: if ((tree1 NE [blank]) AND (Last EQ Trevor)) then show the record.I found several problems with the code I posted earlier, so here is the revised form:>
> > > > > >Search: > >Rice
>Higdon
>Cox
>Polansky
> > > > >Last: >First: >Address: >City: >State: >Zip: >HPhone: >Birthday: >Email: >Website: > > > > > >
Putting a display of the formvariables in RESULTS.TPL, I get:>&max=5 >&allreqd=T >&Tree1=neRtreedata >&Tree2=neHtreedata >&Tree3=neCtreedata >&Tree4=nePtreedata >&group1field=%5B_Tree3%5D >&negroup1data=%5Bblank%5D >&Lastdata= >&Firstdata=Trevor >&Addressdata= >&Citydata= >&Statedata= >&Zipdata= >&HPhonedata= >&Birthdaydata= >&Emaildata= >&Websitedata=As you see, Tree3 did not get substituted. Hope this explains it better. Like I said, it is a bit hard to put into a short number of words. I think that I need to be setting the groupfield in the Results page, but if I do that, then it is not in the formvariables and other things will break. -Chuck-__________________________________________________________________________ Chuck Rice ------------------------------------------------------------- Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server. To end your Mail problems go to .This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Chuck Rice

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:

[OT] (waaaay OT) further off topic than before (2004) WebMerchant 3.0 for Mac shipping now (1998) [WebDNA] Rewrite url (2013) case sensitivity in lookups (1997) RE: Answer: WebDelivery downloads alias, not original ? (1997) multiple file uploads (2002) [WebDNA] webdna in amazon (2020) WebCat2b13MacPlugIn - [include] doesn't allow creator (1997) Variable prices and Formulas.db (1997) PSC recommends what date format yr 2000??? (1997) Bug Report, maybe (1997) WebCatalog can't find database (1997) Generating unique SKU from [cart] - FIXED! (1997) Sending mail (2001) PROBLEM (1997) Max Record length restated as maybe bug (1997) 2.0.1 new commands and contexts (1997) Public beta 2 for WebCatalog 4.0 is now available. (2000) Off Topic: Help Wanted (1997) system crashes, event log (1997)