Re: math with multiple [founditems]
This WebDNA talk-list message is from 1999
It keeps the original formatting.
numero = 23745
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?>>Thanks>Brant>>>>You could use something like this:New for 3.0: note that you do not have to use the [Math] context to display a math variable later in the page; you may simply put the variablename inside brackets like so: [varname]. Both [Math]varname[/Math] and [varname] will display the same thing.So you could do something like:[Math show=F]Total=0[/Math][Math show=F]Var1=0[/Math][Math show=F]Var2=0[/Math]...[FoundItems][Math show=F]Var1=[fieldname][/Math][/FoundItems]...[FoundItems][Math show=F]Var2=[anotherfieldname][/Math][/FoundItems]...[Math show=F]Total=[Var1]+[Var2][/Math]...Your total is: [total]....etc...--_______________________________________________________________Charles Kline ckline@macsultants.com WebMaster - eCommerce SpecialistMacSultantsProfessional Solutions for Computer SystemsPhone# 609-273-3255Fax# 609-273-3721
Associated Messages, from the most recent to the oldest:
>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?>>Thanks>Brant>>>>You could use something like this:New for 3.0: note that you do not have to use the
[math] context to display a math variable later in the page; you may simply put the variablename inside brackets like so: [varname]. Both
[math]varname[/Math] and [varname] will display the same thing.So you could do something like:[Math show=F]Total=0[/Math][Math show=F]Var1=0[/Math][Math show=F]Var2=0[/Math]...
[founditems][Math show=F]Var1=[fieldname][/Math][/FoundItems]...
[founditems][Math show=F]Var2=[anotherfieldname][/Math][/FoundItems]...[Math show=F]Total=[Var1]+[Var2][/Math]...Your total is: [total]....etc...--_______________________________________________________________Charles Kline ckline@macsultants.com WebMaster - eCommerce SpecialistMacSultantsProfessional Solutions for Computer SystemsPhone# 609-273-3255Fax# 609-273-3721
charles kline
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 can't find database (1997)
Sorting by date (1997)
ShoppingCarts (2000)
ReadDateFormat (1998)
Cookie Crumble (1998)
For those of you not on the WebCatalog Beta... (1997)
For those of you not on the WebCatalog Beta... (1997)
Not really WebCat (1997)
Problems with cybercash (2000)
Security Issue (1997)
WebCat2 beta 11 - new prefs ... (1997)
Emailer Set Up (1997)
BW in a search (2007)
SiteGuard Use Question (1997)
Automatic Forwarding using WebCat (1997)
Emailer (1997)
Bug? (1997)
slow site (2003)
[Announce] Newest Commerce Site based on WebCatalog (1997)
Giving out error pages (1997)