Re: Showing Results Alphabetically in Columns (top to bottom)

This WebDNA talk-list message is from

2002


It keeps the original formatting.
numero = 46201
interpreted = N
texte = Nice sol, but it won't give you individual table cells.Here is a solution that *will* give you individual cells.The basic principle is that the numeric value of the next cell in a row is equal to the value of the previous cell in a row + the total number of rows. So for the following 3 column 4 row that you wish to sort like so, each cell is assigned a number:1 5 9 2 6 10 3 7 11 4 8 12Thus, cell 2 in row 1 is assigned a value of 5, because 5 equals 1 (value of cell 1, row 1) + 4 (total number of rows). Similarly, Cell 3 in row 1 is equal to 9, because 9 equals 5 (value of cell 2, row 1) + 4 (total number of rows).Once we decide what number value belongs in a cell, it's a simple matter to do our search and plug the correct founditem into it's corresponding cell:[search db=names.db&nenamedatarq=[blank]&asnamesort=1][founditems][showif [index]=[thiscell]][name][/showif][/founditems][/search]OK, below is the whole enchilada, which can be viewed here --> http://www.novaderm.com/test/tabletest.tplIt sorts these records (located in this order) in names.db:name Jack Sam Abby Carl Bob Mike Dave Ed Gabe Harold Frank Iggy[math show=f]thiscell=1[/math] [math show=f]thisrownum=1[/math] [math show=f]totalrows=0[/math] [search db=names.db&nenamedata=[blank]] [founditems] [showif [index]\3][math show=f]totalrows=[totalrows]+1[/math][/showif] [/founditems] [/search] [search db=names.db&nenamedata=[blank]] [math show=f]col=0[/math] [founditems] [showif [index]\3][math show=f]col=0[/math][math show=f]thisrownum=[thisrownum]+1[/math][math show=f]thiscell=[thisrownum][/math][/showif] [/founditems] [/search]
[math show=f]col=[col]+1[/math][showif [col]=1][thisrownum][/showif][showif [col]>1][math]thiscell=[thiscell]+[totalrows][/math][/showif]-[search db=names.db&nenamedatarq=[blank]&asnamesort=1][founditems][showif [index]=[thiscell]][name][/showif][/founditems][/search]
HTH, Will Starck NovaDerm Skincare Science http://www.novaderm.com wjs@novaderm.comOn Tuesday, December 10, 2002, at 07:46 PM, Andrew Simpson wrote:> not sure if that was the response i was expecting.... > > [math][numfound]/3[/math] should give you the number of rows. > > > > [search > db=database.txt&wscommitteedatarq=[committeesku]&lnamesort=1&lnamesdir= > as] > [text]number=[math][numfound]/3[/math][/text] > [text]counter=0[/text] > [founditems] > [text]counter=[math][counter]+1[/math][/text] > [fname] [lname]
> [showif [counter]>[number]] > > [text]counter=0[/text] > [/showif] > [/founditems] > [/search] > > > > ----- Original Message ----- > From: Kimberly D. Walls (Ingram) > To: WebCatalog Talk > Sent: Wednesday, December 11, 2002 2:30 PM > Subject: Re: Showing Results Alphabetically in Columns (top to bottom) > > >> Well that sucks.... In some cases, I may have 5 rows and in other >> cases, > I >> may have 50. Is this the only way? >> >> Poo! >> >> >> -----Original Message----- >> From: WebCatalog Talk [mailto:WebDNA-Talk@talk.smithmicro.com]On >> Behalf >> Of Andrew Simpson >> Sent: Tuesday, December 10, 2002 8:25 PM >> To: WebCatalog Talk >> Subject: Re: Showing Results Alphabetically in Columns (top to bottom) >> >> >> you have to work out how many rows you are going to have first and >> divide >> that by three. >> >> >> >> >> ----- Original Message ----- >> From: Kimberly D. Walls (Ingram) >> To: WebCatalog Talk >> Sent: Wednesday, December 11, 2002 2:21 PM >> Subject: Showing Results Alphabetically in Columns (top to bottom) >> >> >>> Surely, someone has found a way to make this happen... but I can't >>> seem > to >>> find anything in the archives. Probably because I don't know what to > look >>> for. >>> >>> >>> >>> [search >>> > db=database.txt&wscommitteedatarq=[committeesku]&lnamesort=1&lnamesdir= > as] >>> >>> [founditems] >>> >>> >>> >>>
[fname] [lname] >>> >>> >>> >>> [showif [index]\3][/showif] >>> >>> [/founditems] >>> >>> [/search] >>> >>> >>> >>> This particular line: [showif [index]\3][/showif] >>> >>> brings back results in three columns... but alphabetically from left >>> to >>> right across the columns. How would I go about showing results in >>> alphabetical order from top to bottom? >>> >>> So instead of: >>> >>> A B C >>> >>> D E F >>> >>> I would like to have: >>> >>> A C E >>> >>> B D F >>> >>> >>> >>> I'm stuck. >>> >>> Kim >>> >>> >>> >>> >>> ------------------------------------------------------------- >>> 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/ >> >> >> ------------------------------------------------------------- >> 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/ >> >> >> >> >> ------------------------------------------------------------- >> 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/ > > > ------------------------------------------------------------- > 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/ > > --------------------------------------------------------------- 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:

    
  1. Re: Showing Results Alphabetically in Columns (top to bottom) (Kimberly D. Walls \(Ingram\) 2002)
  2. Re: Showing Results Alphabetically in Columns (top to bottom) (Donovan 2002)
  3. Re: Showing Results Alphabetically in Columns (top to bottom) (WJ Starck 2002)
  4. Re: Showing Results Alphabetically in Columns (top to bottom) (Rob Marquardt 2002)
  5. Re: Showing Results Alphabetically in Columns (top to bottom) (WJ Starck 2002)
  6. Re: Showing Results Alphabetically in Columns (top to bottom) (WJ Starck 2002)
  7. Re: Showing Results Alphabetically in Columns (top to bottom) (Kimberly D. Walls \(Ingram\) 2002)
  8. Re: Showing Results Alphabetically in Columns (top to bottom) (Kimberly D. Walls \(Ingram\) 2002)
  9. Re: Showing Results Alphabetically in Columns (top to bottom) (WJ Starck 2002)
  10. Re: Showing Results Alphabetically in Columns (top to bottom) (Andrew Simpson 2002)
  11. Re: Showing Results Alphabetically in Columns (top to bottom) (Donovan Brooke 2002)
  12. Re: Showing Results Alphabetically in Columns (top to bottom) (WJ Starck 2002)
  13. Re: Showing Results Alphabetically in Columns (top to bottom) (Andrew Simpson 2002)
  14. Re: Showing Results Alphabetically in Columns (top to bottom) (Tim Robinson 2002)
  15. Re: Showing Results Alphabetically in Columns (top to bottom) (Andrew Simpson 2002)
  16. Re: Showing Results Alphabetically in Columns (top to bottom) (Donovan Brooke 2002)
  17. Re: Showing Results Alphabetically in Columns (top to bottom) (Donovan Brooke 2002)
  18. Re: Showing Results Alphabetically in Columns (top to bottom) (Inkblot Media 2002)
  19. Re: Showing Results Alphabetically in Columns (top to bottom) (Donovan Brooke 2002)
  20. Re: Showing Results Alphabetically in Columns (top to bottom) (Inkblot Media 2002)
  21. Re: Showing Results Alphabetically in Columns (top to bottom) (Andrew Simpson 2002)
  22. Re: Showing Results Alphabetically in Columns (top to bottom) (Andrew Simpson 2002)
  23. Re: Showing Results Alphabetically in Columns (top to bottom) (Kimberly D. Walls \(Ingram\) 2002)
  24. Re: Showing Results Alphabetically in Columns (top to bottom) (Andrew Simpson 2002)
  25. Showing Results Alphabetically in Columns (top to bottom) (Kimberly D. Walls \(Ingram\) 2002)
Nice sol, but it won't give you individual table cells.Here is a solution that *will* give you individual cells.The basic principle is that the numeric value of the next cell in a row is equal to the value of the previous cell in a row + the total number of rows. So for the following 3 column 4 row that you wish to sort like so, each cell is assigned a number:1 5 9 2 6 10 3 7 11 4 8 12Thus, cell 2 in row 1 is assigned a value of 5, because 5 equals 1 (value of cell 1, row 1) + 4 (total number of rows). Similarly, Cell 3 in row 1 is equal to 9, because 9 equals 5 (value of cell 2, row 1) + 4 (total number of rows).Once we decide what number value belongs in a cell, it's a simple matter to do our search and plug the correct founditem into it's corresponding cell:[search db=names.db&nenamedatarq=[blank]&asnamesort=1][founditems][showif [index]=[thiscell]][name][/showif][/founditems][/search]OK, below is the whole enchilada, which can be viewed here --> http://www.novaderm.com/test/tabletest.tplIt sorts these records (located in this order) in names.db:name Jack Sam Abby Carl Bob Mike Dave Ed Gabe Harold Frank Iggy[math show=f]thiscell=1[/math] [math show=f]thisrownum=1[/math] [math show=f]totalrows=0[/math] [search db=names.db&nenamedata=[blank]] [founditems] [showif [index]\3][math show=f]totalrows=[totalrows]+1[/math][/showif] [/founditems] [/search] [search db=names.db&nenamedata=[blank]] [math show=f]col=0[/math] [founditems] [showif [index]\3][math show=f]col=0[/math][math show=f]thisrownum=[thisrownum]+1[/math][math show=f]thiscell=[thisrownum][/math][/showif] [/founditems] [/search]
[math show=f]col=[col]+1[/math][showif [col]=1][thisrownum][/showif][showif [col]>1][math]thiscell=[thiscell]+[totalrows][/math][/showif]-[search db=names.db&nenamedatarq=[blank]&asnamesort=1][founditems][showif [index]=[thiscell]][name][/showif][/founditems][/search]
HTH, Will Starck NovaDerm Skincare Science http://www.novaderm.com wjs@novaderm.comOn Tuesday, December 10, 2002, at 07:46 PM, Andrew Simpson wrote:> not sure if that was the response i was expecting.... > > [math][numfound]/3[/math] should give you the number of rows. > > > > [search > db=database.txt&wscommitteedatarq=[committeesku]&lnamesort=1&lnamesdir= > as] > [text]number=[math][numfound]/3[/math][/text] > [text]counter=0[/text] > [founditems] > [text]counter=[math][counter]+1[/math][/text] > [fname] [lname]
> [showif [counter]>[number]] > >
[text]counter=0[/text] > [/showif] > [/founditems] > [/search] > > > > ----- Original Message ----- > From: Kimberly D. Walls (Ingram) > To: WebCatalog Talk > Sent: Wednesday, December 11, 2002 2:30 PM > Subject: Re: Showing Results Alphabetically in Columns (top to bottom) > > >> Well that sucks.... In some cases, I may have 5 rows and in other >> cases, > I >> may have 50. Is this the only way? >> >> Poo! >> >> >> -----Original Message----- >> From: WebCatalog Talk [mailto:WebDNA-Talk@talk.smithmicro.com]On >> Behalf >> Of Andrew Simpson >> Sent: Tuesday, December 10, 2002 8:25 PM >> To: WebCatalog Talk >> Subject: Re: Showing Results Alphabetically in Columns (top to bottom) >> >> >> you have to work out how many rows you are going to have first and >> divide >> that by three. >> >> >> >> >> ----- Original Message ----- >> From: Kimberly D. Walls (Ingram) >> To: WebCatalog Talk >> Sent: Wednesday, December 11, 2002 2:21 PM >> Subject: Showing Results Alphabetically in Columns (top to bottom) >> >> >>> Surely, someone has found a way to make this happen... but I can't >>> seem > to >>> find anything in the archives. Probably because I don't know what to > look >>> for. >>> >>> >>> >>> [search >>> > db=database.txt&wscommitteedatarq=[committeesku]&lnamesort=1&lnamesdir= > as] >>> >>> [founditems] >>> >>> >>> >>> [fname] [lname] >>> >>> >>> >>> [showif [index]\3][/showif] >>> >>> [/founditems] >>> >>> [/search] >>> >>> >>> >>> This particular line: [showif [index]\3][/showif] >>> >>> brings back results in three columns... but alphabetically from left >>> to >>> right across the columns. How would I go about showing results in >>> alphabetical order from top to bottom? >>> >>> So instead of: >>> >>> A B C >>> >>> D E F >>> >>> I would like to have: >>> >>> A C E >>> >>> B D F >>> >>> >>> >>> I'm stuck. >>> >>> Kim >>> >>> >>> >>> >>> ------------------------------------------------------------- >>> 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/ >> >> >> ------------------------------------------------------------- >> 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/ >> >> >> >> >> ------------------------------------------------------------- >> 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/ > > > ------------------------------------------------------------- > 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/ > > --------------------------------------------------------------- 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/ WJ Starck

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:

[Lookup] on secure page not returning anything (2000) 5.0 Pricing (2003) partial credits (2003) [OT] Connect to MySQL (Solved) (2004) Re[3]: 2nd WebCatalog2 Feature Request (1996) [OT] - Credit card processing company fees (2004) form data submission gets truncated (1997) [trim]?! (2004) ooops...WebCatalog [FoundItems] Problem - LONG - (1997) request for string functions (1998) RE: Purchased cart being overwritten (1997) Cross domains Shopping Carts (2003) WebCat2 several catalogs? (1997) Date Calulation (1997) [WebDNA] DNA suffix (2008) Math Help (2000) [WebDNA] Sorry WebDNA server not running. (2015) [sql] problems in WebCat 4.0 (2000) Logging purchases (1997) PCS Frames (1997)