Re: [WebDNA] math and blank /no value

This WebDNA talk-list message is from

2014


It keeps the original formatting.
numero = 111433
interpreted = N
texte = --Apple-Mail=_2D022446-880E-49C1-B75A-0F26312C9638 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 This will fix your problem: [text show=3DF]totalcharges=3D[math][FORMAT = .2f][ad_listing_price][/FORMAT]+[FORMAT = .2f][promo_topspot_price][/FORMAT]+[FORMAT = .2f][photo_update_price][/FORMAT][/math][/text] If any of your values are blank they will be formatted to 0.00 so that = your math will then be able to calculate without error. Regards Stuart Tremain IDFK Web Developments AUSTRALIA webdna@idfk.com.au On 6 Jul 2014, at 1:57 am, Rich Kwas wrote: > Hope everyone in the US had a nice 4th of July..... > Chicago stopped its lakefront fireworks extravaganza years ago.... ;( >=20 >=20 > A somewhat simple [math] addition snippet is driving me nuts >=20 > I've seen this referenced one way or another in the talklists..... >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > Another trick for dealing with fields that may be blank is to prepend=20= > them with a 0 within the math = context:[math][_itemamount]+[_postage]+0[_donation][/math] > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >=20 >=20 > Doesn't behave as mentioned that way for me..... >=20 >=20 > I'm ultimately snatching some price values and doing simple addition: >=20 > [text = show=3DF]totalcharges=3D[math][ad_listing_price]+[promo_topspot_price]+[ph= oto_update_price][/math][/text] >=20 > (there will be many more fields, but for now I'm just dealing with = those 3) >=20 > If any one of those 3 price variables is not passed from the form the = addition will not happen. > If all 3 are passed they total up just fine.=20 > There might be as many as 13 fields getting totaled up when complete. > There might be just one price to pass along, maybe 2 or 3 to add up, = maybe 4 or 5 etc >=20 > Adding a "0" like mentioned in the talklist entries I've found does = nothing. >=20 > I've used [listvariables] and [formvariables] to be sure those 3 = prices are being passed around OK and they are.... >=20 >=20 > Something simple I'm missing or flying over my head? >=20 > Adding [hideif]s into that [math] part is an option, but looking for a = simpler solution. >=20 > I'm running version 6.2 on Windows Server2008 >=20 > Searching the newer talklist gets a little clunky at times using that = form..... >=20 >=20 >=20 >=20 > =20 > --------------------------------------------------------- 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 Bug Reporting: = support@webdna.us --Apple-Mail=_2D022446-880E-49C1-B75A-0F26312C9638 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=iso-8859-1 This = will fix your problem:

[text show=3DF]totalcharges=3D[math][FORMAT = .2f][ad_listing_price][/FORMAT]+[FORMAT .2f][promo_topspot_price][/FORMAT]+[FORMAT .2f][photo_update_price][/FORMAT][/math][/text]

If any of your values are blank they will be formatted = to 0.00 so that your math will then be able to calculate without = error.

Regards

Stuart = Tremain
IDFK Web Developments
AUSTRALIA




On 6 Jul 2014, at 1:57 am, Rich Kwas <richkwasniewski@yahoo.com>= ; wrote:

Hope = everyone in the US had a nice 4th of July.....
Chicago stopped its lakefront fireworks extravaganza years = ago.... ;(


A somewhat simple [math] addition snippet is driving me = nuts

I've seen this referenced one way or another in the = talklists.....

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Another trick for = dealing with fields that may be blank is to prepend 
them with a 0 within the math context:[math][_itemamount]+[_postage]+0[_donation][/math]
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D


Doesn't behave as mentioned = that way for me.....


I'm ultimately snatching some = price values and doing simple addition:

[text = show=3DF]totalcharges=3D[math][ad_listing_price]+[promo_topspot_price]+[photo_update_pr= ice][/math][/text]

(there will be many more fields, but for now = I'm just dealing with those 3)

If any one of those 3 price variables is not = passed from the form the addition will not happen.
If all 3 are passed they = total up just fine. 
There might be as many as 13 fields getting totaled up when = complete.
There might be just one price to pass along, maybe 2 or 3 to = add up, maybe 4 or 5 etc

Adding a "0" like mentioned in the talklist = entries I've found does nothing.

I've used [listvariables] and [formvariables] = to be sure those 3 prices are being passed around OK and they = are....


Something simple I'm missing or flying over my = head?

Adding [hideif]s = into that [math] part is an option, but looking for a simpler = solution.

I'm running = version 6.2 on Windows Server2008

Searching the newer = talklist gets a little clunky at times using that form.....




 
--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/l= ist/talk@webdna.us Bug Reporting: support@webdna.us

= --Apple-Mail=_2D022446-880E-49C1-B75A-0F26312C9638-- Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] math and blank /no value (=?utf-8?Q?iPhonzie=40G?= 2014)
  2. Re: [WebDNA] math and blank /no value (Kenneth Grome 2014)
  3. Re: [WebDNA] math and blank /no value (Rich Kwas 2014)
  4. Re: [WebDNA] math and blank /no value (Stuart Tremain 2014)
  5. [WebDNA] math and blank /no value (Rich Kwas 2014)
--Apple-Mail=_2D022446-880E-49C1-B75A-0F26312C9638 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 This will fix your problem: [text show=3DF]totalcharges=3D[math][FORMAT = .2f][ad_listing_price][/FORMAT]+[FORMAT = .2f][promo_topspot_price][/FORMAT]+[FORMAT = .2f][photo_update_price][/FORMAT][/math][/text] If any of your values are blank they will be formatted to 0.00 so that = your math will then be able to calculate without error. Regards Stuart Tremain IDFK Web Developments AUSTRALIA webdna@idfk.com.au On 6 Jul 2014, at 1:57 am, Rich Kwas wrote: > Hope everyone in the US had a nice 4th of July..... > Chicago stopped its lakefront fireworks extravaganza years ago.... ;( >=20 >=20 > A somewhat simple [math] addition snippet is driving me nuts >=20 > I've seen this referenced one way or another in the talklists..... >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > Another trick for dealing with fields that may be blank is to prepend=20= > them with a 0 within the math = context:[math][_itemamount]+[_postage]+0[_donation][/math] > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >=20 >=20 > Doesn't behave as mentioned that way for me..... >=20 >=20 > I'm ultimately snatching some price values and doing simple addition: >=20 > [text = show=3DF]totalcharges=3D[math][ad_listing_price]+[promo_topspot_price]+[ph= oto_update_price][/math][/text] >=20 > (there will be many more fields, but for now I'm just dealing with = those 3) >=20 > If any one of those 3 price variables is not passed from the form the = addition will not happen. > If all 3 are passed they total up just fine.=20 > There might be as many as 13 fields getting totaled up when complete. > There might be just one price to pass along, maybe 2 or 3 to add up, = maybe 4 or 5 etc >=20 > Adding a "0" like mentioned in the talklist entries I've found does = nothing. >=20 > I've used [listvariables] and [formvariables] to be sure those 3 = prices are being passed around OK and they are.... >=20 >=20 > Something simple I'm missing or flying over my head? >=20 > Adding [hideif]s into that [math] part is an option, but looking for a = simpler solution. >=20 > I'm running version 6.2 on Windows Server2008 >=20 > Searching the newer talklist gets a little clunky at times using that = form..... >=20 >=20 >=20 >=20 > =20 > --------------------------------------------------------- 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 Bug Reporting: = support@webdna.us --Apple-Mail=_2D022446-880E-49C1-B75A-0F26312C9638 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=iso-8859-1 This = will fix your problem:

[text show=3DF]totalcharges=3D[math][FORMAT = .2f][ad_listing_price][/FORMAT]+[FORMAT .2f][promo_topspot_price][/FORMAT]+[FORMAT .2f][photo_update_price][/FORMAT][/math][/text]

If any of your values are blank they will be formatted = to 0.00 so that your math will then be able to calculate without = error.

Regards

Stuart = Tremain
IDFK Web Developments
AUSTRALIA




On 6 Jul 2014, at 1:57 am, Rich Kwas <richkwasniewski@yahoo.com>= ; wrote:

Hope = everyone in the US had a nice 4th of July.....
Chicago stopped its lakefront fireworks extravaganza years = ago.... ;(


A somewhat simple [math] addition snippet is driving me = nuts

I've seen this referenced one way or another in the = talklists.....

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Another trick for = dealing with fields that may be blank is to prepend 
them with a 0 within the math context:[math][_itemamount]+[_postage]+0[_donation][/math]
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D


Doesn't behave as mentioned = that way for me.....


I'm ultimately snatching some = price values and doing simple addition:

[text = show=3DF]totalcharges=3D[math][ad_listing_price]+[promo_topspot_price]+[photo_update_pr= ice][/math][/text]

(there will be many more fields, but for now = I'm just dealing with those 3)

If any one of those 3 price variables is not = passed from the form the addition will not happen.
If all 3 are passed they = total up just fine. 
There might be as many as 13 fields getting totaled up when = complete.
There might be just one price to pass along, maybe 2 or 3 to = add up, maybe 4 or 5 etc

Adding a "0" like mentioned in the talklist = entries I've found does nothing.

I've used [listvariables] and [formvariables] = to be sure those 3 prices are being passed around OK and they = are....


Something simple I'm missing or flying over my = head?

Adding [hideif]s = into that [math] part is an option, but looking for a simpler = solution.

I'm running = version 6.2 on Windows Server2008

Searching the newer = talklist gets a little clunky at times using that form.....




 
--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/l= ist/talk@webdna.us Bug Reporting: support@webdna.us

= --Apple-Mail=_2D022446-880E-49C1-B75A-0F26312C9638-- Stuart Tremain

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:

time and welcome (1999) What am I missing (1997) OT: Web Cams (2003) [WebDNA] An unknown error occured // Deadlock avoided (2011) Sporadic database errors (2005) multiple search commands (1997) View order not right (1997) [WebDNA] [hideif]'s not working in [sendmail] (2008) [WebDNA] Need some PHP help (2009) set header in DB (no cart) (2003) WebDNA / Red Hat 9 ? (2003) Happy Easter ... and grep string request ... (2004) Mystery authentication (1997) SKU (1997) Number of cars in cart... (2004) WebCat2b13MacPlugIn - [showif][search][/showif] (1997) ASP and Web DNA (1998) WebCatalog/WebMerchant Manuals Available (1998) ' add to cart ' or ' sku ' problem (1998) Error Log.db --however (1997)