Re: Help! WebCat2 bug

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 10383
interpreted = N
texte = >> Gil, you could try replacing your checkboxes temporarily with a scrolling >> list. Be sure to make multiple choices selectable in the list. If the code >> is updated for scrolling lists, that might work. >> >> The other solution might even be better, and that's to collect the data on >> the search form, but don't do the search from the sarch form. Instead, >> place all the form values into variables, then pass them to the results >> form. Next, place a [search] context in the results form, and use the >> variables to assemble the search parameters as shown in the HTML example I >> quoted from the HTML docs above. > >Well, I think I'm almost there. Thank you Ken, for your input. I liked >your second idea better, so I gave it a try. This is from the page that >calls the template: > >
> > >And this is the search syntax from the template: > >[search >db=catalog.txt&max=25&astitlesort=1&eqint5datarq=2&wotext1datarq=230,270,235,25 >0,603,220,280,285,9005,015&group1field=description+title+text7&wogroup1datarq=ke >yword&group1word=ww&startAt=1] > >Unfortunately, it's still not working, but I feel like I'm on the right >track. Any further guidance based on this syntax would be most >appreciated. Sorry about the volume of data here, but I didn't know a >better way to explain it.No problem with including the entire HTML from your pages, it makes things a lot clearer than trying to describe things sometimes, at least for me ... :)When I do something like this, I always name my variables beginning with v. so I can always remember that they are variables. Then I use names that help me to understand what those variables refer to, for example, I would do something like this:>SIZE=+1>Battles and >Campaigns
>The >Confederacy
>SIZE=+1>Gettysburg
Then on the results page, my search context would be something like this:[search >db=catalog.txt&max=25&astitlesort=1&eqint5datarq=2&wotext1datarq=[v.battles_and >_campaigns],[v.the_confederacy],[v.gettysburg]&group1field=description+title+tex >t7&wogroup1datarq=keyword&group1word=ww&startAt=1]Using this variable naming convention makes my life a lot easier, because I never get confused about whether I'm looking at a variable or at a text string that I 'thought' was a variable. You don't have to do this, but it works for me!One thing you do have to remember, however, is that when you're using variables in a search context, you have to place them inside [] brackets ... so WebCat2 knows that it's supposed to replace those variable 'names' with the 'values' you've assigned them on the previous template.Maybe that's why your search isn't giving you the results you expect ... because it's using the literal values (230,270,235,250,603,220,280,285,9005,015) instead of the value those variables represent.In your particular case, with the way you've written your search parameters, WebCat2 is using the literal values of your variables ... so it's probably retrieving every record in your database even though you're only checking *some* or *none* of the checkboxes, right? :)If you don't want to use my variable-naming convention, try using this search context and see if it works properly for you:[search db=catalog.txt&max=25&astitlesort=1&eqint5datarq=2&wotext1datarq=[230],[270],[23 5],[250],[603],[220],[280],[285],[9005],[015]&group1field=description+title+text 7&wogroup1datarq=keyword&group1word=ww&startAt=1]Sincerely, Ken ------------------------------------ To leave this talk list send an email to macjordomo@smithmicro.com with BODY unsubscribe WebDNA-Talk ------------------------------------ Associated Messages, from the most recent to the oldest:

ACTION=cwresult.tmpl$search> > > > >Choose one or more subject areas:
>
>Battles and >Campaigns
>The >Confederacy
>SIZE=+1>Gettysburg
>Generals and >Other Leaders
>Historical >Fiction: Civil War
>Histories >and Reference
>Memoirs, >Diaries and Letters
>Regimental >Histories
>SIZE=+1>Video
>Osprey >Series: Civil War
>SIZE=+1>All

> >Enter a keyword (author, title or subject) to further >refine your search:

>
>Tip: To search the entire Civil War database by keyword >only, make sure that you have not selected any of the category >checkboxes above. >

VALUE=Clear Form>

    
  1. Re: Help! WebCat2 bug (Ben Finklea 1997)
  2. Re: Help! WebCat2 bug (Ben's input) (Ben Finklea 1997)
  3. Re: Help! WebCat2 bug (Gil Poulsen 1997)
  4. Re: Help! WebCat2 bug (Kenneth Grome 1997)
  5. Re: Help! WebCat2 bug (Gil Poulsen 1997)
  6. Re: Help! WebCat2 bug (Kenneth Grome 1997)
  7. Re: Help! WebCat2 bug (Kenneth Grome 1997)
  8. Re: Help! WebCat2 bug (Gil Poulsen 1997)
  9. Re: Help! WebCat2 bug (Kenneth Grome 1997)
  10. Re: Help! WebCat2 bug (John Hill 1997)
  11. Re: Help! WebCat2 bug (Gil Poulsen 1997)
  12. Re: Help! WebCat2 bug (John Hill 1997)
  13. Help! WebCat2 bug (Gil Poulsen 1997)
>> Gil, you could try replacing your checkboxes temporarily with a scrolling >> list. Be sure to make multiple choices selectable in the list. If the code >> is updated for scrolling lists, that might work. >> >> The other solution might even be better, and that's to collect the data on >> the search form, but don't do the search from the sarch form. Instead, >> place all the form values into variables, then pass them to the results >> form. Next, place a [search] context in the results form, and use the >> variables to assemble the search parameters as shown in the HTML example I >> quoted from the HTML docs above. > >Well, I think I'm almost there. Thank you Ken, for your input. I liked >your second idea better, so I gave it a try. This is from the page that >calls the template: > >
> > >And this is the search syntax from the template: > >[search >db=catalog.txt&max=25&astitlesort=1&eqint5datarq=2&wotext1datarq=230,270,235,25 >0,603,220,280,285,9005,015&group1field=description+title+text7&wogroup1datarq=ke >yword&group1word=ww&startAt=1] > >Unfortunately, it's still not working, but I feel like I'm on the right >track. Any further guidance based on this syntax would be most >appreciated. Sorry about the volume of data here, but I didn't know a >better way to explain it.No problem with including the entire HTML from your pages, it makes things a lot clearer than trying to describe things sometimes, at least for me ... :)When I do something like this, I always name my variables beginning with v. so I can always remember that they are variables. Then I use names that help me to understand what those variables refer to, for example, I would do something like this:>SIZE=+1>Battles and >Campaigns
>The >Confederacy
>SIZE=+1>Gettysburg
Then on the results page, my search context would be something like this:[search >db=catalog.txt&max=25&astitlesort=1&eqint5datarq=2&wotext1datarq=[v.battles_and >_campaigns],[v.the_confederacy],[v.gettysburg]&group1field=description+title+tex >t7&wogroup1datarq=keyword&group1word=ww&startAt=1]Using this variable naming convention makes my life a lot easier, because I never get confused about whether I'm looking at a variable or at a text string that I 'thought' was a variable. You don't have to do this, but it works for me!One thing you do have to remember, however, is that when you're using variables in a search context, you have to place them inside [] brackets ... so WebCat2 knows that it's supposed to replace those variable 'names' with the 'values' you've assigned them on the previous template.Maybe that's why your search isn't giving you the results you expect ... because it's using the literal values (230,270,235,250,603,220,280,285,9005,015) instead of the value those variables represent.In your particular case, with the way you've written your search parameters, WebCat2 is using the literal values of your variables ... so it's probably retrieving every record in your database even though you're only checking *some* or *none* of the checkboxes, right? :)If you don't want to use my variable-naming convention, try using this search context and see if it works properly for you:[search db=catalog.txt&max=25&astitlesort=1&eqint5datarq=2&wotext1datarq=[230],[270],[23 5],[250],[603],[220],[280],[285],[9005],[015]&group1field=description+title+text 7&wogroup1datarq=keyword&group1word=ww&startAt=1]Sincerely, Ken ------------------------------------ To leave this Talk List send an email to macjordomo@smithmicro.com with BODY unsubscribe WebDNA-Talk ------------------------------------ Kenneth Grome

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:

WebCatalog/Mac 2.1b2 New Features (1997) WebCatalog can't find database (1997) Configuring E-mail (1997) Up and running ... at last !! (1997) grep question - removing spaces (2005) [WebDNA] character encodings in linux (2011) unable to launch acgi in WebCat (1997) Merging databases (1997) WebCat2 Append problem (B14Macacgi) (1997) Printing a final order (1997) Need relative path explanation (1997) WebCat2b13MacPlugIn - More limits on [include] (1997) method of payment (1997) add to cart within a page? (1997) Sendmail Recipients (2001) Ticket Ordering Question (2003) OT: Windows-based Code Editor (2002) Need relative path explanation (1997) Intermitent problem using [referrer] (1997) WebCat2 beta 11 - new prefs ... (1997)
ACTION=cwresult.tmpl$search> >[cart]> > > >Choose one or more subject areas:
>
>Battles and >Campaigns
>The >Confederacy
>SIZE=+1>Gettysburg
>Generals and >Other Leaders
>Historical >Fiction: Civil War
>Histories >and Reference
>Memoirs, >Diaries and Letters
>Regimental >Histories
>SIZE=+1>Video
>Osprey >Series: Civil War
>SIZE=+1>All

> >Enter a keyword (author, title or subject) to further >refine your search:

>
>Tip: To search the entire Civil War database by keyword >only, make sure that you have not selected any of the category >checkboxes above. >

VALUE=Clear Form>