Re: [WebDNA] maybe silly suggestion? [founditems]

This WebDNA talk-list message is from

2015


It keeps the original formatting.
numero = 111907
interpreted = N
texte = Sorry but I find nothing of value in any of these suggestions that have to do with savefounditems or listfounditems or displayfounditems. > With [savefounditems], you could save several sets of searches > on the same database ... We can do this now simply by setting [text] variables in searches at the top of the page. > Given a page with formvariables “firstname” and “city”, the top of your code could do: > [search people.db&eqfirstnamedatarq=[firstname]&allhit=1&lastnamesort=1&max=25] > [if [numfound]=0][then] > DO ERROR STUFF] > [/then][else] > [savefounditems namepeople] > [/else][/if] > [/search] Or we can do this now without any special new tags, like this: [search ...] [if [numfound]=0] [then]DO ERROR STUFF[/then] [else] [text]namepeople=[founditems][firstname], [/founditems][/text] [/else] [/if] [/search] Then further on down the page: People named [firstname]: [namepeople] I do things like this all the time on order to keep complex code at the top of the page and simplify my HTML which appears at the bottom of the page. Therefore I do not understand how your suggested new tags can provide us with any feature that is better or more useful than what we already have at our disposal. But if I am missing something please feel free to explain it in a different way, then maybe I will "get it". Regards, Kenneth Grome WebDNA Solutions http://www.webdnasolutions.com Web Database Systems and Linux Server Management On 01/15/2015 12:27 PM, iPhonzie@G wrote: > I really like the idea of [savefounditems] / > [displayfounditems] (or maybe [listfounditems] for consistency > with other looping context names). > > Chris, if your [sto] concept is about persistent globally > available values, then I don’t think that applies to the need > here - the saved results generally only need to persist for the > life of the current page. > > Internal to the WebDNA engine, this may well leverage the same > code as [table] - the [savefounditems] could create a private > table and [listfounditems] could execute a generic unranked > search of that table > > With [savefounditems], you could save several sets of searches > on the same database, such as “peoplenameddave” and > “peoplefromalbuquerque”, gathered at the top of your page with > appropriate error responses, etc. Later in the display portion > of your page you could call a common function to display HTML > tables of Daves and Albequerqians. > > So, given a page with formvariables “firstname” and “city”, > the top of your code could do: > > [search > people.db&eqfirstnamedatarq=[firstname]&allhit=1&lastnamesort=1&max=25] > > [if [numfound]=0][then] > DO ERROR STUFF] [/then][else] [savefounditems namepeople] > [/else][/if] [/search] > > [search > people.db&eqcitydatarq=[city]&allhit=1&lastnamesort=1&firstnamesort=2&max=25] > > [if [numfound]=0][then] > DO ERROR STUFF] [/then][else] [savefounditems citypeople] > [/else][/if] [/search] > > [function name=showpeople] [listfounditems > [params_string]] > > > [/listfounditems]
[index]][firstname][lastname][city][any > > field in people.db]
[/function] Later in the display > code you could do: > > People named [firstname]: [showpeople namepeople] > > People from [city]: [showpeople citypeople] > > > — Brian Fries > > On January 15, 2015 at 9:55:07 AM, Terry Wilson > (terry@terryfic.com ) wrote: > >> Or just put the search parameters in a variable up top to >> retrieve as needed with showifs. This is quite handy for >> repurposing found items loops, such as a nicely formatted >> table of info that is sorted by various fields (just >> discussed this a few days ago). This has the added benefit of >> letting you keep constants like eventdatetype=date, max=25, >> etc in the actual search code to keep your parameters easier >> to read and manage. This would certainly put your controller >> logic separate from your display code. >> >> [showif >> [somesearch]=t][text]searchforwhat=db=allthethings.db&blahblahblah[/text][/showif] >> >> >> [showif >> [someothersearch]=t][text]searchforwhat=db=allthethings.db&blahblahblah[/text][/showif] >> >> >> >> [search [searchforwhat]&max=25&lastnamesort=1] >> >>> >>> >>> On Jan 14, 2015, at 2:57 PM, Brian Burton >>> wrote: >>> >>>> to help separate my controller logic from my display code >>>> it would be awesome to have a shortcut like: [search >>>> db=allthethings.db&blahblahblah][savefounditems >>>> name=peoplenameddave][/search] >>>> >>>> >>>> >>>> >>>> then later in the page, where i’m rendering the html >>>> [displayfounditems use=peoplenameddave] html things >>>> [/displayfounditems] >>>> >>>> >>>> >>>> I know it looks like it’s not saving that much code, but >>>> I can see switching which search I want in the >>>> controller, and still being able to use a universal >>>> founditems loop lower in the code. Also the ability to >>>> reuse search results (if needed) without doing the same >>>> search again. >>>> >>>> ok, feel free to start telling me how you can do this >>>> with a table (you’re missing the point) or how we don’t >>>> need more tags or whatever :) >>>> >>>> >>>> -Brian B. Burton >> > --------------------------------------------------------- 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 Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] maybe silly suggestion? [founditems] (Kenneth Grome 2015)
  2. Re: [WebDNA] maybe silly suggestion? [founditems] (christophe.billiottet@webdna.us 2015)
  3. Re: [WebDNA] maybe silly suggestion? [founditems] (Michael Davis 2015)
  4. Re: [WebDNA] maybe silly suggestion? [founditems] (Kenneth Grome 2015)
  5. Re: [WebDNA] maybe silly suggestion? [founditems] (christophe.billiottet@webdna.us 2015)
  6. Re: [WebDNA] maybe silly suggestion? [founditems] (Stuart Tremain 2015)
  7. Re: [WebDNA] maybe silly suggestion? [founditems] (Dan Strong 2015)
  8. Re: [WebDNA] maybe silly suggestion? [founditems] (Brian Burton 2015)
  9. Re: [WebDNA] maybe silly suggestion? [founditems] (Brian Burton 2015)
  10. Re: [WebDNA] maybe silly suggestion? [founditems] (Dan Strong 2015)
  11. Re: [WebDNA] maybe silly suggestion? [founditems] (Brian Burton 2015)
  12. Re: [WebDNA] maybe silly suggestion? [founditems] (=?utf-8?Q?iPhonzie=40G?= 2015)
  13. Re: [WebDNA] maybe silly suggestion? [founditems] (Brian Burton 2015)
  14. Re: [WebDNA] maybe silly suggestion? [founditems] (Donovan Brooke 2015)
  15. Re: [WebDNA] maybe silly suggestion? [founditems] (Kenneth Grome 2015)
  16. Re: [WebDNA] maybe silly suggestion? [founditems] (Dan Strong 2015)
  17. Re: [WebDNA] maybe silly suggestion? [founditems] (Kenneth Grome 2015)
  18. Re: [WebDNA] maybe silly suggestion? [founditems] (Donovan Brooke 2015)
  19. Re: [WebDNA] maybe silly suggestion? [founditems] (=?utf-8?Q?iPhonzie=40G?= 2015)
  20. Re: [WebDNA] maybe silly suggestion? [founditems] (=?utf-8?Q?iPhonzie=40G?= 2015)
  21. Re: [WebDNA] maybe silly suggestion? [founditems] (christophe.billiottet@webdna.us 2015)
  22. Re: [WebDNA] maybe silly suggestion? [founditems] (Kenneth Grome 2015)
  23. Re: [WebDNA] maybe silly suggestion? [founditems] (=?utf-8?Q?iPhonzie=40G?= 2015)
  24. Re: [WebDNA] maybe silly suggestion? [founditems] (=?utf-8?Q?iPhonzie=40G?= 2015)
  25. Re: [WebDNA] maybe silly suggestion? [founditems] (Stephen Reiss 2015)
  26. Re: [WebDNA] maybe silly suggestion? [founditems] (Terry Wilson 2015)
  27. Re: [WebDNA] maybe silly suggestion? [founditems] (Terry Wilson 2015)
  28. Re: [WebDNA] maybe silly suggestion? [founditems] (Lawrence Banahan 2015)
  29. Re: [WebDNA] maybe silly suggestion? [founditems] ("Psi Prime Inc, Matthew A Perosi " 2015)
  30. Re: [WebDNA] maybe silly suggestion? [founditems] (Donovan Brooke 2015)
  31. Re: [WebDNA] maybe silly suggestion? [founditems] (Donovan Brooke 2015)
  32. Re: [WebDNA] maybe silly suggestion? [founditems] (Kenneth Grome 2015)
  33. Re: [WebDNA] maybe silly suggestion? [founditems] (Terry Wilson 2015)
  34. Re: [WebDNA] maybe silly suggestion? [founditems] (Donovan Brooke 2015)
  35. Re: [WebDNA] maybe silly suggestion? [founditems] (Donovan Brooke 2015)
  36. Re: [WebDNA] maybe silly suggestion? [founditems] (Terry Wilson 2015)
  37. Re: [WebDNA] maybe silly suggestion? [founditems] (Kenneth Grome 2015)
  38. Re: [WebDNA] maybe silly suggestion? [founditems] (Donovan Brooke 2015)
  39. Re: [WebDNA] maybe silly suggestion? [founditems] (Donovan Brooke 2015)
  40. Re: [WebDNA] maybe silly suggestion? [founditems] (christophe.billiottet@webdna.us 2015)
  41. Re: [WebDNA] maybe silly suggestion? [founditems] (Kenneth Grome 2015)
  42. [WebDNA] maybe silly suggestion? [founditems] (Brian Burton 2015)
Sorry but I find nothing of value in any of these suggestions that have to do with savefounditems or listfounditems or displayfounditems. > With [savefounditems], you could save several sets of searches > on the same database ... We can do this now simply by setting [text] variables in searches at the top of the page. > Given a page with formvariables “firstname” and “city”, the top of your code could do: > [search people.db&eqfirstnamedatarq=[firstname]&allhit=1&lastnamesort=1&max=25] > [if [numfound]=0][then] > DO ERROR STUFF] > [/then][else] > [savefounditems namepeople] > [/else][/if] > [/search] Or we can do this now without any special new tags, like this: [search ...] [if [numfound]=0] [then]DO ERROR STUFF[/then] [else] [text]namepeople=[founditems][firstname], [/founditems][/text] [/else] [/if] [/search] Then further on down the page: People named [firstname]: [namepeople] I do things like this all the time on order to keep complex code at the top of the page and simplify my HTML which appears at the bottom of the page. Therefore I do not understand how your suggested new tags can provide us with any feature that is better or more useful than what we already have at our disposal. But if I am missing something please feel free to explain it in a different way, then maybe I will "get it". Regards, Kenneth Grome WebDNA Solutions http://www.webdnasolutions.com Web Database Systems and Linux Server Management On 01/15/2015 12:27 PM, iPhonzie@G wrote: > I really like the idea of [savefounditems] / > [displayfounditems] (or maybe [listfounditems] for consistency > with other looping context names). > > Chris, if your [sto] concept is about persistent globally > available values, then I don’t think that applies to the need > here - the saved results generally only need to persist for the > life of the current page. > > Internal to the WebDNA engine, this may well leverage the same > code as [table] - the [savefounditems] could create a private > table and [listfounditems] could execute a generic unranked > search of that table > > With [savefounditems], you could save several sets of searches > on the same database, such as “peoplenameddave” and > “peoplefromalbuquerque”, gathered at the top of your page with > appropriate error responses, etc. Later in the display portion > of your page you could call a common function to display HTML > tables of Daves and Albequerqians. > > So, given a page with formvariables “firstname” and “city”, > the top of your code could do: > > [search > people.db&eqfirstnamedatarq=[firstname]&allhit=1&lastnamesort=1&max=25] > > [if [numfound]=0][then] > DO ERROR STUFF] [/then][else] [savefounditems namepeople] > [/else][/if] [/search] > > [search > people.db&eqcitydatarq=[city]&allhit=1&lastnamesort=1&firstnamesort=2&max=25] > > [if [numfound]=0][then] > DO ERROR STUFF] [/then][else] [savefounditems citypeople] > [/else][/if] [/search] > > [function name=showpeople] [listfounditems > [params_string]] > > > [/listfounditems]
[index]][firstname][lastname][city][any > > field in people.db]
[/function] Later in the display > code you could do: > > People named [firstname]: [showpeople namepeople] > > People from [city]: [showpeople citypeople] > > > — Brian Fries > > On January 15, 2015 at 9:55:07 AM, Terry Wilson > (terry@terryfic.com ) wrote: > >> Or just put the search parameters in a variable up top to >> retrieve as needed with showifs. This is quite handy for >> repurposing found items loops, such as a nicely formatted >> table of info that is sorted by various fields (just >> discussed this a few days ago). This has the added benefit of >> letting you keep constants like eventdatetype=date, max=25, >> etc in the actual search code to keep your parameters easier >> to read and manage. This would certainly put your controller >> logic separate from your display code. >> >> [showif >> [somesearch]=t][text]searchforwhat=db=allthethings.db&blahblahblah[/text][/showif] >> >> >> [showif >> [someothersearch]=t][text]searchforwhat=db=allthethings.db&blahblahblah[/text][/showif] >> >> >> >> [search [searchforwhat]&max=25&lastnamesort=1] >> >>> >>> >>> On Jan 14, 2015, at 2:57 PM, Brian Burton >>> wrote: >>> >>>> to help separate my controller logic from my display code >>>> it would be awesome to have a shortcut like: [search >>>> db=allthethings.db&blahblahblah][savefounditems >>>> name=peoplenameddave][/search] >>>> >>>> >>>> >>>> >>>> then later in the page, where i’m rendering the html >>>> [displayfounditems use=peoplenameddave] html things >>>> [/displayfounditems] >>>> >>>> >>>> >>>> I know it looks like it’s not saving that much code, but >>>> I can see switching which search I want in the >>>> controller, and still being able to use a universal >>>> founditems loop lower in the code. Also the ability to >>>> reuse search results (if needed) without doing the same >>>> search again. >>>> >>>> ok, feel free to start telling me how you can do this >>>> with a table (you’re missing the point) or how we don’t >>>> need more tags or whatever :) >>>> >>>> >>>> -Brian B. Burton >> > --------------------------------------------------------- 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 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:

ShowIf Question (1998) Verifying both name and password (was: New Problem) (1997) Public beta 6 for WebCatalog 4.0 is now available (2000) Quitting WebMerchant ? (1997) upgrading (1997) wierd [cart] action! (1997) ImageMagick (2005) Cart Numbers (1997) spawn (1998) Nested tags count question (1997) [format 40s]text[/format] doesn't work (1997) Reminder for beta testers (2000) [cart][date][time] (2003) !!!!!!!!!!String Search!!!!!!!!!!!!!!!!!! (2001) I'm having trouble using [url][interpret][math] together in lookup (1997) more on quicktime test stuff (1997) Linked lists and Recursive searching (2003) Trouble with Netscape (1998) Authorize.net for dummies (2003) Variable Math (1998)