RE: WebCat cannot handle compatible search parameters?

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 13128
interpreted = N
texte = Ken -I don't actually know why (I see more or less the same thing you are seeing), but I think there's a better way to approach this kind of search. By the way, it seems that you get more predictable results if you use ..&mrdatefielddata=[date].. since dates are essentially treated as numbers.Anyway, if your form is a variable collector rather than pointing to an actual search command, you can use an embedded search command and change the search depending on whether a data value was selected from the pop-up list or not. It may be easier to use separate fieldnames in the form, but something like[search db=your.db&[showif[selecteddate]=]mrdatefielddata=[date]&[/showif][hideif[selecteddate=]eqdatefielddata=[selecteddate]&[/hideif]....seems like it would work. This example may be a bit simplistic, but it's one way to achieve the results you're looking for.I hope this helps,Marc Eagle StarNine Technologies http://www.smithmicro.com/>From: WebDNA-Talk@smithmicro.com on Thu, Aug 21, 1997 6:49 PM >Subject: WebCat cannot handle compatible search parameters? >To: WebDNA-Talk@smithmicro.com > >Why can't WebCat deal with two compatible search parameters for the >same database field? > >I have a database with a date field in it. I need a forms-based >search to have the following parameter so it won't retrieve any >records earlier than today's date, so I put this in the form: > > > >I also need a selection list on the form so users can select all the >records with an exact date (if that's what they choose to do). The >following code creates a popup list with a blank first option. The >rest of the options are dates which appear in the database as today's >date or later: > > > >When I do NOT set a date in the popup, WebCat selects only the dates >from today and later. That's what I would expect. But when I set the >popup to a specific date, WebCat should give me all the records with >that date - it should NOT give ne zero records. > >Why is it that WebCat cannot deal with this search when I try to set >the date with the popup? > >Any date I set with the popup is already restricted to the same range >of dates defined in the hidden field. The popup should simply allow >me to select a specific date - within the range of dates allowed by >the hidden field. > >But as soon as I try to use the hidden field to select a specific >date, I get zero matching records - which is impossible ... but >that's what I get. > >Sincerely, Ken Grome >WebDNA Solutions >http://www.hui.net/dna/webdna.html Associated Messages, from the most recent to the oldest:

    
  1. Re: WebCat cannot handle compatible search parameters? (Kenneth Grome 1997)
  2. Re: WebCat cannot handle compatible search parameters? (Kenneth Grome 1997)
  3. Re: WebCat cannot handle compatible search parameters? (Olin 1997)
  4. Re: WebCat cannot handle compatible search parameters? (John Hill 1997)
  5. Re: WebCat cannot handle compatible search parameters? (Kenneth Grome 1997)
  6. Re: WebCat cannot handle compatible search parameters? (John Hill 1997)
  7. RE: WebCat cannot handle compatible search parameters? (Marc Eagle 1997)
Ken -I don't actually know why (I see more or less the same thing you are seeing), but I think there's a better way to approach this kind of search. By the way, it seems that you get more predictable results if you use ..&mrdatefielddata=[date].. since dates are essentially treated as numbers.Anyway, if your form is a variable collector rather than pointing to an actual search command, you can use an embedded search command and change the search depending on whether a data value was selected from the pop-up list or not. It may be easier to use separate fieldnames in the form, but something like[search db=your.db&[showif[selecteddate]=]mrdatefielddata=[date]&[/showif][hideif[selecteddate=]eqdatefielddata=[selecteddate]&[/hideif]....seems like it would work. This example may be a bit simplistic, but it's one way to achieve the results you're looking for.I hope this helps,Marc Eagle StarNine Technologies http://www.smithmicro.com/>From: WebDNA-Talk@smithmicro.com on Thu, Aug 21, 1997 6:49 PM >Subject: WebCat cannot handle compatible search parameters? >To: WebDNA-Talk@smithmicro.com > >Why can't WebCat deal with two compatible search parameters for the >same database field? > >I have a database with a date field in it. I need a forms-based >search to have the following parameter so it won't retrieve any >records earlier than today's date, so I put this in the form: > >[date]> > >I also need a selection list on the form so users can select all the >records with an exact date (if that's what they choose to do). The >following code creates a popup list with a blank first option. The >rest of the options are dates which appear in the database as today's >date or later: > > > >When I do NOT set a date in the popup, WebCat selects only the dates >from today and later. That's what I would expect. But when I set the >popup to a specific date, WebCat should give me all the records with >that date - it should NOT give ne zero records. > >Why is it that WebCat cannot deal with this search when I try to set >the date with the popup? > >Any date I set with the popup is already restricted to the same range >of dates defined in the hidden field. The popup should simply allow >me to select a specific date - within the range of dates allowed by >the hidden field. > >But as soon as I try to use the hidden field to select a specific >date, I get zero matching records - which is impossible ... but >that's what I get. > >Sincerely, Ken Grome >WebDNA Solutions >http://www.hui.net/dna/webdna.html Marc Eagle

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:

Help! WebCat2 bug (1997) Passing WebCat data to SSL server (1997) ConvertCharacters (2000) [WebDNA] agree? --> [url] broken inside [redirect], on a square-bracket-style include, included from a XML-style page (2009) WebCatalog [FoundItems] Problem - LONG - (1997) How to verify email address (1997) multiple search commands (1997) Major Security Hole (1998) Emailer (1997) Date field search needs ... (1998) Limiting user access to .tmpl files (1997) [WebDNA] XML Help please (2009) Text Variabels Not Passed To Include (2002) mimeheaders to allow back button to work on a posted page? (2004) upgrading (1997) Zip Code Search (2000) New Cart No. on same page (2003) WebCatalog and directory indexing (1998) Displaying photo attached to first record (1997) WebCat2b15MacPlugin - showing [math] (1997)