There is no particularcontext for this. Use [math] to add things up along the way. Above the fo=unditems loop, open up variables likeso:
[mathshow=3Df]runningtotal=3D0[/math]
[math show=3Df]=]runningquantity=3D0[/math]
Then in the founditems loop,==A0
[math show=3D=f]runningtotal=3Drunningtotal+[amt][/math] (orwhatever fieldname holds the amount)
[math show=3D=f]runningquantity=3Drunningquantity+[qty][/math]=A0(orwhatever fieldname holds the quantity)
In math, you don't have to =bracket the fieldname, but if you prefer to doso, feel free; it will work that way as well.
At the end, just display [runningtotal] and [runningquanti=ty]
By the way, =this is also a handy way to get a more accuratenumfound if you are using [hideif] anywhere in the founditems to exclude =results. Sometimes you need to do it that wayinstead of excluding in the search parameters.
<=br class=3D"webkit-block-placeholder">
Terry
On Wed, 7 Oct 2009 10:5=1:10 -0700
Tana Adams<tana@volleyhut.com> wrote:
> I know there's a way to calcula=te the sum and quantities
>within[founditems]
> but I can't seem to locate it in the online referenc=e.
> Could someone please
> pointme in the right direction?
>
> Thanks,
>
> Tana=
=A0
There is no particularcontext for this. Use
[math] to add things up along the way. Above the fo=unditems loop, open up variables likeso:
[mathshow=3Df]runningtotal=3D0[/math]
[math show=3Df]=]runningquantity=3D0[/math]
Then in the founditems loop,==A0
[math show=3D=f]runningtotal=3Drunningtotal+[amt][/math] (orwhatever fieldname holds the amount)
[math show=3D=f]runningquantity=3Drunningquantity+[qty][/math]=A0(orwhatever fieldname holds the quantity)
In math, you don't have to =bracket the fieldname, but if you prefer to doso, feel free; it will work that way as well.
At the end, just display [runningtotal] and [runningquanti=ty]
By the way, =this is also a handy way to get a more accuratenumfound if you are using
[hideif] anywhere in the founditems to exclude =results. Sometimes you need to do it that wayinstead of excluding in the search parameters.
<=br class=3D"webkit-block-placeholder">
Terry
On Wed, 7 Oct 2009 10:5=1:10 -0700
Tana Adams<tana@volleyhut.com> wrote:
> I know there's a way to calcula=te the sum and quantities
>within
[founditems]> but I can't seem to locate it in the online referenc=e.
> Could someone please
> pointme in the right direction?
>
> Thanks,
>
> Tana=
=A0
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...