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:

WebCatalog for guestbook ? (1997) Commas in search (1998) Install Webcatalog under NT4.0 and Microsoft IIS 2.0 (1997) Limiting user access to .tmpl files (1997) WebCatb15 Mac CGI -- [purchase] (1997) listfiles shows invisible files ... (1999) WebCat2b13MacPlugIn - [include] doesn't allow creator (1997) BIAP relay (1999) Graphical display of sales volume (2003) Rendering out a page (1997) Search in 2 or more catalogs (1997) two unique banners on one page (1997) WebCatalog for guestbook ? (1997) Multiple ship to addresses (2005) Re[2]: Wierd problem with 3.08 WIN Version (2000) Ok here is a question? (1997) Counting LineItems (2000) pop up menu's (1998) Help! WebCat2 bug (1997) creator code (1997)