Re: Conditional searching & displaying

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 14816
interpreted = N
texte = >>Put the founditems context for this part in a showif that's true when >>numfound<2. > >M: I'll try it, I hadn't thought about using [showif] to control the >[Founditems] context. > >>Showif based on what? The number of records found? > >M: Yes based up on [numfound] > >>>C. Do a second search based upon the same [showif] criteria that only uses >>>the previous arguement for the Specialty field (ignoring the City >>>arguement) and displays those results in the same results.tmpl below the >>>error message. >> >>I'm not following you ... > >M: Yeah, my description's a little obtuse so here's an illustration of a >results page I'd like to see if someone searched by Specialty and City (in >this case, Cardiologists in the city of La Jolla) and the returned numfound >is less than 2. > >Your search found the following: > >Dr. Smith <---------- this is the record that >Cardiologist met both search criteria >La Jolla > >Additionally, you may wish to review <---- the [showif] error >these other Cardiologists practicing message >in neighboring areas: > >Dr. Jones <--------- the results from the secondary search which >Cardiologist searched only by Specialty >San Diego (not by Specialty *and* City) > >Dr. Johnson >Cardiologist >Pacific Beach You can do this by collecting the search parameter values on the form page, then passing those values to individual search contexts on the results page. >>>Problem 2: >>You could use the summary parameter in a separate search with all the >>other parameters being the same. >> > >M: I was trying to figure out how to use Summary for this but according to >the docs the Summary parameter will remove all but the first record in >found list. What I'd like to do is display the entire list of found items >but only display the city field once per original instance within the group >of found items. How's that for obtuse??My explanation was as obtuse as yours ... :)What I meant was to perform a separate search for each area name you want to display, then do an almost identical search (but without the fieldNameSumm=T parameter to actually list the doctors in that area. In other words, you'll have a bunch of separate search contexts on the page ... :) > >thanks >-marty Sincerely, Ken Grome WebDNA Solutions http://www.smithmicro.com/webdnasolutions/. Associated Messages, from the most recent to the oldest:

    
  1. Re: Conditional searching & displaying (Kenneth Grome 1997)
  2. Re: Conditional searching & displaying (Marty Schmid 1997)
  3. Re: Conditional searching & displaying (Kenneth Grome 1997)
  4. Conditional searching & displaying (Marty Schmid 1997)
  5. Conditional searching & displaying (Marty Schmid 1997)
>>Put the founditems context for this part in a showif that's true when >>numfound<2. > >M: I'll try it, I hadn't thought about using [showif] to control the >[founditems] context. > >>Showif based on what? The number of records found? > >M: Yes based up on [numfound] > >>>C. Do a second search based upon the same [showif] criteria that only uses >>>the previous arguement for the Specialty field (ignoring the City >>>arguement) and displays those results in the same results.tmpl below the >>>error message. >> >>I'm not following you ... > >M: Yeah, my description's a little obtuse so here's an illustration of a >results page I'd like to see if someone searched by Specialty and City (in >this case, Cardiologists in the city of La Jolla) and the returned numfound >is less than 2. > >Your search found the following: > >Dr. Smith <---------- this is the record that >Cardiologist met both search criteria >La Jolla > >Additionally, you may wish to review <---- the [showif] error >these other Cardiologists practicing message >in neighboring areas: > >Dr. Jones <--------- the results from the secondary search which >Cardiologist searched only by Specialty >San Diego (not by Specialty *and* City) > >Dr. Johnson >Cardiologist >Pacific Beach You can do this by collecting the search parameter values on the form page, then passing those values to individual search contexts on the results page. >>>Problem 2: >>You could use the summary parameter in a separate search with all the >>other parameters being the same. >> > >M: I was trying to figure out how to use Summary for this but according to >the docs the Summary parameter will remove all but the first record in >found list. What I'd like to do is display the entire list of found items >but only display the city field once per original instance within the group >of found items. How's that for obtuse??My explanation was as obtuse as yours ... :)What I meant was to perform a separate search for each area name you want to display, then do an almost identical search (but without the fieldNameSumm=T parameter to actually list the doctors in that area. In other words, you'll have a bunch of separate search contexts on the page ... :) > >thanks >-marty Sincerely, Ken Grome WebDNA Solutions http://www.smithmicro.com/webdnasolutions/. 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:

Thanks for tips, more quest (1997) WCS Newbie question (1997) Some Questions (1997) Search Results (1998) [WebDNA] Advice required (2009) Working HTML email (2001) webcat 2.1 new cart fields - please explain more (1998) Showif, Hideif reverse logic ? (1997) Way Off Topic (2003) combine search (1998) Re:listfiles-looking for slick solution (1997) Search in 2 or more catalogs (1997) Clean Code: Rules for inserting keyboard returns? (1997) Bad cookie (1998) Next X hits (1996) [WebDNA] BBEdit WebDNA Configuration.plist (Language (2013) Pithy questions on webcommerce & siteedit (1997) More than one db with the same namn (was: WC2f3) (1997) CR's (2003) Only charge card when product shipped ? (1997)