Re: Summing fields

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 10807
interpreted = N
texte = Grant Hulbert wrote: > > >I think it was mentioned once that it is possible to calculate a total > >for a particular field over records in a database. What is the syntax > >for doing this? > > <--starts a total variable at 0 > [FoundItems] > > [/FoundItems] > > If you view source you will see this generates a lot of HTML comments like with the intermediate results. You might also try > > [math]total=[FoundItems][field]+[/FoundItems]0[/math] > > This generates a single math equation that looks like total=5+9+4+49+7+96+0 > > I'm not sure if there's a limit to the length of the math expression, but I think it will be OK if it gets long.Apparently both methods work cause I see the 's. The second displayed the total as I wanted. How would I get the total to display using the first method? I like the first method since I use the same total several times. Would avoid having to calculate itseveral times andkeep the templates shorter. Associated Messages, from the most recent to the oldest:

    
  1. Re: Summing fields in a search/founditems context?? (Jason Tyler 2000)
  2. Summing fields in a search/founditems context?? (Robert McPeak 2000)
  3. Re: Summing Fields (Martin Gertz Bech 1998)
  4. Re: Summing Fields (Christer Olsson 1998)
  5. Summing Fields (Wayne Morishige 1998)
  6. Re: Summing fields (grichter@panavise.com (Gary Richter) 1997)
  7. Re: Summing fields (Grant Hulbert 1997)
  8. Re: Summing fields (Kenneth Grome 1997)
  9. Re: Summing fields (grichter@panavise.com (Gary Richter) 1997)
  10. Re: Summing fields (Grant Hulbert 1997)
  11. Re: Summing fields (Kenneth Grome 1997)
  12. Re: Summing fields (Britt T. 1997)
  13. Re: Summing fields (Grant Hulbert 1997)
  14. Re: Summing fields (Kenneth Grome 1997)
  15. Re: Summing fields (Grant Hulbert 1997)
  16. Re: Summing fields (Dean Smith 1997)
  17. Re: Summing fields (Dean Smith 1997)
  18. Re: Summing fields (Grant Hulbert 1997)
  19. Summing fields (Dean Smith 1997)
Grant Hulbert wrote: > > >I think it was mentioned once that it is possible to calculate a total > >for a particular field over records in a database. What is the syntax > >for doing this? > > [math]total=0[/math]> <--starts a total variable at 0 > [founditems] > [math]total=total+[field][/math]> > [/FoundItems] > > If you view source you will see this generates a lot of HTML comments like with the intermediate results. You might also try > > [math]total=[founditems][field]+[/FoundItems]0[/math] > > This generates a single math equation that looks like total=5+9+4+49+7+96+0 > > I'm not sure if there's a limit to the length of the math expression, but I think it will be OK if it gets long.Apparently both methods work cause I see the 's. The second displayed the total as I wanted. How would I get the total to display using the first method? I like the first method since I use the same total several times. Would avoid having to calculate itseveral times andkeep the templates shorter. Dean Smith

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:

Data Entry ... Excel Style ... How To? (2001) FoundItems Question (1998) Public beta 5 of WebCatalog 4.0 is now available (2000) WebCatalog2 Feature Feedback (1996) Progress !! WAS: Trouble with formula.db (1997) Stumpted Again (1997) Generating Report Totals (1997) I think WebDNA-Talk died ... :( (1997) Retaining data (2003) [Sum] function? (1997) Date problems (1997) MacWEEK article help needed (1996) Template transformed itself into a database? (1998) Emailer problems (1998) [WebDNA] YouTube API v2.0 - OAuth 2.0 Authorization (2013) Test (2003) Multiple Pulldowns (1997) WebCatalog for Dummies part 2 (2000) Re:Help name our technology! (1997) shownext (1997)