Re: math with multiple [founditems]

This WebDNA talk-list message is from

1999


It keeps the original formatting.
numero = 23761
interpreted = N
texte = >I have a search that returns mulitple entries from one field (all >numbers) and I'd like to add all those values together. I was thinking >something like this: > >[founditems][math][fieldname]+[/math][/founditems] > >but of course this doesn't work. How could I make this work?You need the [math] context to be on the *outside* of the [FoundItems] loop.[math][founditems][fieldname]+[/founditems]0[/math]That trailing '0' is to make sure the equation finishes off with a number instead of a dangling '+', so it would end up looking like this:[math]1+15+45+14+3+0[/math]Technical Support | ==== eCommerce and Beyond ==== Pacific Coast Software | WebCatalog, WebMerchant, 11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMaster, San Diego, CA 92128 | Typhoon 619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: math with multiple [founditems] (Kenneth Grome 1999)
  2. Re: math with multiple [founditems] (es-sleestak 1999)
  3. Re: math with multiple [founditems] (es-sleestak 1999)
  4. Re: math with multiple [founditems] (Kenneth Grome 1999)
  5. Re: math with multiple [founditems] (PCS Technical Support 1999)
  6. Re: math with multiple [founditems] (es-sleestak 1999)
  7. Re: math with multiple [founditems] (Howard Wolosky 1999)
  8. Re: math with multiple [founditems] (charles kline 1999)
  9. math with multiple [founditems] (es-sleestak 1999)
>I have a search that returns mulitple entries from one field (all >numbers) and I'd like to add all those values together. I was thinking >something like this: > >[founditems][math][fieldname]+[/math][/founditems] > >but of course this doesn't work. How could I make this work?You need the [math] context to be on the *outside* of the [founditems] loop.[math][founditems][fieldname]+[/founditems]0[/math]That trailing '0' is to make sure the equation finishes off with a number instead of a dangling '+', so it would end up looking like this:[math]1+15+45+14+3+0[/math]Technical Support | ==== eCommerce and Beyond ==== Pacific Coast Software | WebCatalog, WebMerchant, 11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMaster, San Diego, CA 92128 | Typhoon 619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com/ PCS Technical Support

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:

FEW QUESTIONS (1997) About Include (2001) [WebDNA] [announce] CICADA Gold Products (2009) emailer on Windows Beta 18 (1997) 2.0Beta Command Ref (can't find this instruction) (1997) Signal Raised Error (Part II) (1997) Sendmail: bounced e-mails (2001) Bad match! (2002) Search/sort in URL Was: GuestBook example (1997) rotating thumbnails (1997) OFF TOPIC: help wanted (1997) [TaxableTotal] - not working with AOL and IE (1997) process SSI (1998) OT: Urgent help with Windows and Javascript (2003) Multiple fields on 1 input (1997) Multiple prices (1997) [SHOWIF]s and empty arguments (1997) RE: Credit Card Checksum (1997) [AppendFile] problem (WebCat2b13 Mac .acgi) (1997) WebDNA HitLogger available (was Signal Raised Error) (1997)