Re: Sorting Problems
This WebDNA talk-list message is from 2004
It keeps the original formatting.
numero = 55457
interpreted = N
texte = How 'bout this... Assuming you've got answers for the sorting issues posted by the others...Instead of directly dumping the data to the page within the founditems loop, stick them into a text variable, pre-pending the new record in front of the previously found records. After leaving the founditems, dump the text variable onto the page.Something like this:[text]tList=[/text][search db=... allhit=1&RecordDatesort=1&RecordDatesdir=de&max=10][founditems][text]tList=[recorddate] [data]
[tList][/text][/founditems][/search][tList].... of course, [tList] could be filled with table rows or whatever you desire. The key is you're sticking the new record in the FRONT of the [tList] variable, before the previous records, so they will be displayed in reverse order of WebDNA's sorting.- brianOn Jan 13, 2004, at 10:52 AM, Pat Holliday wrote:> Hi,>> I have records stored in a db that each have a date chosen by the user > - [RecordDate]. (I.e. the records all have a date but they are not > necessarily in the Db in date order - so rank=off won't work.)>> By default a user will view a page of records loaded with the > [RecordDate] most recent 10, although they can choose to view 20, 50 > or all matching records.>> The nature of the site requires that records appear on the page > horizontally, earliest first.>> eg:>> 5th Jansome data 1> 6th Jansome data 2> 10th Jansome data 3>> To restrict my search to max=10 is easy and sort latest first>> RecordDatesort=1&RecordDatesdir=de>> is fine but the results come out "upside down":>> 10th Jansome data 3> 6th Jansome data 2>> etc>> Anyone think of an elegant solution to this problem?>> Thanks>> Pat>> ps something like this has been mentioned, seems a bit processor > intensive tho:>> [search > db=patsrecords.db&eqcriteriadata=[criteria]&RecordDatesort=1&RecordDate > sdir=as]> [text]OnlyShowIndex=[math][numfound]-[MaxRecords][/math][/text]> [founditems]> [hideif [index]<[OnlyShowIndex]]> Whatever> [/hideif]> [/founditems]> [/search]>> ...or sumfin...:)>> ---------------------------------------------------------> Netro42 - http://www.netro42.com> Web design and development-- Brian Fries, BrainScan Software -- http://www.brainscansoftware.com ---------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list
.To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
How 'bout this... Assuming you've got answers for the sorting issues posted by the others...Instead of directly dumping the data to the page within the founditems loop, stick them into a text variable, pre-pending the new record in front of the previously found records. After leaving the founditems, dump the text variable onto the page.Something like this:[text]tList=[/text][search db=... allhit=1&RecordDatesort=1&RecordDatesdir=de&max=10][founditems][text]tList=[recorddate] [data]
[tList][/text][/founditems][/search][tList].... of course, [tList] could be filled with table rows or whatever you desire. The key is you're sticking the new record in the FRONT of the [tList] variable, before the previous records, so they will be displayed in reverse order of WebDNA's sorting.- brianOn Jan 13, 2004, at 10:52 AM, Pat Holliday wrote:> Hi,>> I have records stored in a db that each have a date chosen by the user > - [RecordDate]. (I.e. the records all have a date but they are not > necessarily in the Db in date order - so rank=off won't work.)>> By default a user will view a page of records loaded with the > [RecordDate] most recent 10, although they can choose to view 20, 50 > or all matching records.>> The nature of the site requires that records appear on the page > horizontally, earliest first.>> eg:>> 5th Jansome data 1> 6th Jansome data 2> 10th Jansome data 3>> To restrict my search to max=10 is easy and sort latest first>> RecordDatesort=1&RecordDatesdir=de>> is fine but the results come out "upside down":>> 10th Jansome data 3> 6th Jansome data 2>> etc>> Anyone think of an elegant solution to this problem?>> Thanks>> Pat>> ps something like this has been mentioned, seems a bit processor > intensive tho:>> [search > db=patsrecords.db&eqcriteriadata=[criteria]&RecordDatesort=1&RecordDate > sdir=as]> [text]OnlyShowIndex=[math][numfound]-[MaxRecords][/math][/text]> [founditems]> [hideif [index]<[OnlyShowIndex]]> Whatever> [/hideif]> [/founditems]> [/search]>> ...or sumfin...:)>> ---------------------------------------------------------> Netro42 - http://www.netro42.com> Web design and development-- Brian Fries, BrainScan Software -- http://www.brainscansoftware.com ---------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Brian Fries
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:
suffix mapping for NT? (1997)
change the number format (1997)
PARAMETER vs. OPERATOR (was The BUG is BACK ...) (1998)
Resume Catalog ? (1997)
Quick Question (1997)
WebCat2: Formulas.db question (1997)
OT : javascript form filling (2000)
Odd [math] behavior (2003)
Multiple fields on 1 input (1997)
Replace Statement (1997)
2.0 Info (1997)
[WebDNA] More wish-list requests implemented (2016)
Gantt style chart (2004)
docs for WebCatalog2 (1997)
changing order number (1998)
WC 2.0 frames feature (1997)
WCS Newbie question (1997)
2nd WebCatalog2 Feature Request (1996)
Removing [showif] makes a big difference in speed (1997)
Dedicated hosting recommendations (2000)