Re: sorting and summarizing
This WebDNA talk-list message is from 1998
It keeps the original formatting.
numero = 18994
interpreted = N
texte = Yes, the summary feature will use the date value for the first record of each unique library. Unfortunately, the summarizing is done as the same time as the search so you can't sort the results before the summary takes place within a single search. Here's a way of doing it (it hasn't been tested, so you may have to play with it a bit) that will work by building a separate database periodically, and then building the list from that:file=lib_list.inc[showif
][include file=build_lib_list.inc][/showif][search db=lib_list.db&neLIBdatarq=find_all&deMODsort=1][founditems][/founditems][/search]file=build_lib_list.inc[closedatabase lib_list.db][search db=lib_list.db&neLIBdatarq=find_all][search ...eqLIBRARYdatarq=[LIB]&deTRUEDATEsort=1&max=1][founditems][replace db=lib_list.db&eqLIBRARYdatarq=[LIB]]mod=[TRUEDATE][/replace][/founditemes][/search][/search]>I have a field (Library) that I summarize to display a table of thumbnails>of the libraries. I add files to some of the libraries periodically, and I>want to sort by descending date, so the libraries with the most recent>additions float to the top.>>Using ...&detruedatesort=1&librarysumm=t sorts almost correctly, except>that it uses the date value of the first alphabetical library record, so if>I add new entries, unless the first alphabetical entry is one of the new>ones, that library won't float to the top.>>Using ... &dlibrarysort=1&detruedatesort=2&librarysumm=t just sorts them>alphabetically.>>Using ... &detruedatesort=1&dlibrarysort=2&librarysumm=t sorts them like>the first example.>>Am I overlooking something here?>>Thanks,>>Terry Wilson>>Terry Wilson>terryw@rainbowcreek.com John A. Hill, V.P. Marketing Pacific Coast SoftwareeCommerce / Web Developer Tools http://www.smithmicro.com
Associated Messages, from the most recent to the oldest:
Yes, the summary feature will use the date value for the first record of each unique library. Unfortunately, the summarizing is done as the same time as the search so you can't sort the results before the summary takes place within a single search. Here's a way of doing it (it hasn't been tested, so you may have to play with it a bit) that will work by building a separate database periodically, and then building the list from that:file=lib_list.inc[showif ][include file=build_lib_list.inc][/showif][search db=lib_list.db&neLIBdatarq=find_all&deMODsort=1][founditems][/founditems][/search]file=build_lib_list.inc[closedatabase lib_list.db][search db=lib_list.db&neLIBdatarq=find_all][search ...eqLIBRARYdatarq=[LIB]&deTRUEDATEsort=1&max=1][founditems][replace db=lib_list.db&eqLIBRARYdatarq=[LIB]]mod=[TRUEDATE][/replace][/founditemes][/search][/search]>I have a field (Library) that I summarize to display a table of thumbnails>of the libraries. I add files to some of the libraries periodically, and I>want to sort by descending date, so the libraries with the most recent>additions float to the top.>>Using ...&detruedatesort=1&librarysumm=t sorts almost correctly, except>that it uses the date value of the first alphabetical library record, so if>I add new entries, unless the first alphabetical entry is one of the new>ones, that library won't float to the top.>>Using ... &dlibrarysort=1&detruedatesort=2&librarysumm=t just sorts them>alphabetically.>>Using ... &detruedatesort=1&dlibrarysort=2&librarysumm=t sorts them like>the first example.>>Am I overlooking something here?>>Thanks,>>Terry Wilson>>Terry Wilson>terryw@rainbowcreek.com John A. Hill, V.P. Marketing Pacific Coast SoftwareeCommerce / Web Developer Tools http://www.smithmicro.com
John Hill
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:
empty shopping cart message (1997)
WebMerchant 1.6 and https (1997)
[OT] javascript field validation with encoded forms (2004)
Country & Ship-to address & other fields ? (1997)
pass a captured value (2004)
Removing [showif] makes a big difference in speed (1997)
Interfacing WC with mail server (1998)
[PHP3] php vs WebCatalog (2000)
More on the email templates (1997)
Re:Change WebDNA-Talk Mail due to no digest for 1wk (1997)
[WebDNA] Before I write this AJAX code from scratch ... (2015)
WebCat2b13MacPlugIn - [include] doesn't allow creator (1997)
[SHOWIF AND/OR] (1997)
WebCat Error Log problem (2.0.1, acgi, Mac) (1997)
More on the email templates (1997)
WebCat2 beta 11 - new prefs ... (1997)
generator prob (2001)
Cancel Subscription (1996)
Exclude by date - multiple (1997)
WebCat2b15MacPlugIn - [authenticate] not [protect] (1997)