Re: [WebDNA] sum in a search

This WebDNA talk-list message is from

2009


It keeps the original formatting.
numero = 103757
interpreted = N
texte = --0016e6480e0899ea0a04755c5770 Content-Type: text/plain; charset=ISO-8859-1 Thanks for responding. I realize I was a bit vague -- sorry -- I couldn't remember the commands. I just looked through some old code to see if I could find one of the actual commands..here is one: "[SUM field=Qty]". It works like the [numfound] command and it obtains the total quantity. I believe there are others like it and I remember locating them in the docs before but can't seem to now. Thanks, Tana On Wed, Oct 7, 2009 at 11:03 AM, Kenneth Grome wrote: > The "summ" in a search doesn't work that way. You actually have to set > math variables to total up the numeric values in a particular field, > something like this: > > [math]total=0[/math] > > [search] > [founditems] > [math]total=total+[fieldname][/math] > [/founditems] > [/search] > > The total for the [fieldname] field is [total]. > > Sincerely, > Ken Grome > > > > > I know there's a way to calculate the sum and quantities within > [founditems] > > but I can't seem to locate it in the online reference. Could someone > please > > point me in the right direction? > > > > Thanks, > > > > Tana > > > > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > old archives: http://dev.webdna.us/TalkListArchive/ > Bug Reporting: http://forum.webdna.us/eucabb.html?page=topics&category=288 > --0016e6480e0899ea0a04755c5770 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thanks for responding.=A0 I realize I was a bit vague -- sorry -- I couldn&= #39;t remember the commands. =A0 I just looked through some old code to see= if I could find one of the actual commands..here is one: "[SUM field= =3DQty]".=A0 It works like the [numfound] command and it obtains the t= otal quantity.=A0 I believe there are others like it and I remember locatin= g them in the docs before but can't seem to now.

Thanks,

Tana



On Wed, O= ct 7, 2009 at 11:03 AM, Kenneth Grome <kengrome@gmail.com> wrote:
The "summ" in a search doesn't work that way. =A0You actually= have to set math variables to total up the numeric values in a particular = field, something like this:

[math]total=3D0[/math]

[search]
[founditems]
[math]total=3Dtotal+[fieldname][/math]
[/founditems]
[/search]

The total for the [fieldname] field is [total].

Sincerely,
Ken Grome



> I know there's a way to calculate the sum and quantities within [f= ounditems]
> but I can't seem to locate it in the online reference. =A0Could so= meone please
> point me in the right direction?
>
> Thanks,
>
> Tana
>

---------------------------------------------------------
This message is sent to you because you are subscribed to
the mailing list <talk@webdna.us&g= t;.
To unsubscribe, E-mail to: <talk= -leave@webdna.us>
archives: http://mail.webdna.us/list/talk@webdna.us
old archives: http://dev.webdna.us/TalkListArchive/
Bug Reporting: http://forum.webdna.us/eucabb.html?pa= ge=3Dtopics&category=3D288

--0016e6480e0899ea0a04755c5770-- Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] sum in a search (Stuart Tremain 2009)
  2. Re: [WebDNA] sum in a search ("Terry Wilson" 2009)
  3. Re: [WebDNA] sum in a search (Govinda 2009)
  4. Re: [WebDNA] sum in a search (Tana Adams 2009)
  5. Re: [WebDNA] sum in a search (Brian Fries 2009)
  6. Re: [WebDNA] sum in a search (Tana Adams 2009)
  7. Re: [WebDNA] sum in a search (Tana Adams 2009)
  8. Re: [WebDNA] sum in a search (Dan Strong 2009)
  9. Re: [WebDNA] sum in a search (Kenneth Grome 2009)
  10. Re: [WebDNA] sum in a search ("Terry Wilson" 2009)
  11. [WebDNA] sum in a search (Tana Adams 2009)
--0016e6480e0899ea0a04755c5770 Content-Type: text/plain; charset=ISO-8859-1 Thanks for responding. I realize I was a bit vague -- sorry -- I couldn't remember the commands. I just looked through some old code to see if I could find one of the actual commands..here is one: "[SUM field=Qty]". It works like the [numfound] command and it obtains the total quantity. I believe there are others like it and I remember locating them in the docs before but can't seem to now. Thanks, Tana On Wed, Oct 7, 2009 at 11:03 AM, Kenneth Grome wrote: > The "summ" in a search doesn't work that way. You actually have to set > math variables to total up the numeric values in a particular field, > something like this: > > [math]total=0[/math] > > [search] > [founditems] > [math]total=total+[fieldname][/math] > [/founditems] > [/search] > > The total for the [fieldname] field is [total]. > > Sincerely, > Ken Grome > > > > > I know there's a way to calculate the sum and quantities within > [founditems] > > but I can't seem to locate it in the online reference. Could someone > please > > point me in the right direction? > > > > Thanks, > > > > Tana > > > > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > old archives: http://dev.webdna.us/TalkListArchive/ > Bug Reporting: http://forum.webdna.us/eucabb.html?page=topics&category=288 > --0016e6480e0899ea0a04755c5770 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thanks for responding.=A0 I realize I was a bit vague -- sorry -- I couldn&= #39;t remember the commands. =A0 I just looked through some old code to see= if I could find one of the actual commands..here is one: "[SUM field= =3DQty]".=A0 It works like the [numfound] command and it obtains the t= otal quantity.=A0 I believe there are others like it and I remember locatin= g them in the docs before but can't seem to now.

Thanks,

Tana



On Wed, O= ct 7, 2009 at 11:03 AM, Kenneth Grome <kengrome@gmail.com> wrote:
The "summ" in a search doesn't work that way. =A0You actually= have to set math variables to total up the numeric values in a particular = field, something like this:

[math]total=3D0[/math]

[search]
[founditems]
[math]total=3Dtotal+[fieldname][/math]
[/founditems]
[/search]

The total for the [fieldname] field is [total].

Sincerely,
Ken Grome



> I know there's a way to calculate the sum and quantities within [f= ounditems]
> but I can't seem to locate it in the online reference. =A0Could so= meone please
> point me in the right direction?
>
> Thanks,
>
> Tana
>

---------------------------------------------------------
This message is sent to you because you are subscribed to
the mailing list <talk@webdna.us&g= t;.
To unsubscribe, E-mail to: <talk= -leave@webdna.us>
archives: http://mail.webdna.us/list/talk@webdna.us
old archives: http://dev.webdna.us/TalkListArchive/
Bug Reporting: http://forum.webdna.us/eucabb.html?pa= ge=3Dtopics&category=3D288

--0016e6480e0899ea0a04755c5770-- Tana Adams

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:

Sorting error (1997) Empty Shopping Carts? (1998) All questions are welcome on this list (1997) setting cookies then redirecting? (1998) More than 2 sort specs? (2003) Special delete ... (1997) Not accepting Zero (2000) WebCatalog Upgrade Pricing? (1997) HELP WITH DATES (1997) PCS Frames (1997) WebDNA Solutions ... (1997) MacActivity and PCS (1997) Web* 4.2 (2000) RE: Formulas.db + Users.db (1997) Emailer (1998) random random links (1999) t or f (1997) webcat and webkitty votes needed (1997) WebCat2 - Getting to the browser's username/password data (1997) The Guru Speaks-very long reply (1998)