Re: Help on how to store calculated value
This WebDNA talk-list message is from 2002
It keeps the original formatting.
numero = 45431
interpreted = N
texte = i think this will work... note the zero after the [/orderfile] [Math Show=F]BW=0+[!][/!][Orderfile cart=[cart]][!][/!][lineitems]([lookup db=admin/products.db&lookinfield=SKU&value=[url][sku][/ url]&returnfield=WEIGHT]*[quantity])+[!][/!][/lineitems][!][/!][/Orderfile]0[/Math]On Monday, November 18, 2002, at 11:55 PM, Kalin Mintchev wrote:>> On Monday, November 18, 2002, at 11:45 PM, Stuart Tremain wrote:>>> putting [lineitems] after the + will not work as you need a + >> after/before each item to add them all together.>> if that's the idea then the code should be:>>>> [Math Show=F]BW=0+[!]> [/!][Orderfile cart=[cart]][!]> [/!][lineitems]([lookup > db=admin/products.db&lookinfield=SKU&value=[url][sku][/ > url]&returnfield=WEIGHT]*[quantity])+[!]> [/!][/lineitems][!]> [/!][/Orderfile]0[/Math]>> or something like it...>>>>>>>>>> On Tuesday, November 19, 2002, at 03:42 PM, Kalin Mintchev wrote:>>>>>>>> On Monday, November 18, 2002, at 11:18 PM, Eric wrote:>>>>>>> Dear Sturat:>>>>>>>> I changed to:>>>>>>>> [Orderfile cart=[cart]]>>>>>>>> [Math Show=F]BW=0[lineitems]+([lookup>>>> db=admin/products.db&lookinfield=SKU&value=[url][sku][/ >>>> url]&returnfield=WEIGHT]*[quantity])[/lineitems][/Math]>>>>>>>> [/Orderfile]>>>>>> put [lineitems] after the +...>>>>>>>>>>> and no more error message but the [BW] did not show the value when >>>> I call>>>>>>>> Total weight=[BW]>>>>>>>> It merely show Total weight=[BW]. It seems the calculated value >>>> did not store at [BW]>>>>>>>> Regards,>>>>>>>> Eric>>>>>>>> At 02:47 PM 11/19/2002 +1100, you wrote:>>>>> Eric>>>>>>>>>> To use the [lineitems] you must have the equation somewhere inside >>>>> an>>>>> [orderfile].>>>>>>>>>> If your equation works where it is just put this in the same place:>>>>>>>>>> [Math show=F]BW=0[lineitems]+([lookup>>>>> db=admin/products.db&lookinfield=SKU&value=[url][sku][/ >>>>> url]&returnfield=WEIGHT]*[quantity])[/lineitems][/Math]>>>>>>>>>>>>>>> What this does is store the calculated value in a Math variable, >>>>> then>>>>> to call the Math variable ....>>>>>>>>>> Here is the total weight = [BW]>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> On Tuesday, November 19, 2002, at 02:12 PM, Eric wrote:>>>>>>>>>>> Hi,>>>>>>>>>>>> I know this is easy but somehow I am brain dead.>>>>>>>>>>>> I have the following calculation and it gives the correct value>>>>>>>>>>>> [math]0[lineitems]+[lookup>>>>>> db=admin/products.db&lookinfield=SKU&value=[url][sku][/ >>>>>> url]&returnfield=WEIGHT]*[quantity][/lineitems][/math]>>>>>>>>>>>> I wish to store the results in a field (to be called BW) so that >>>>>> I can>>>>>> use this field to display the calculated data and for further>>>>>> calculation.>>>>>>>>>>>> I use>>>>>>>>>>>> [BW]=[math]0[lineitems]+[lookup>>>>>> db=admin/products.db&lookinfield=SKU&value=[url][sku][/ >>>>>> url]&returnfield=WEIGHT]*[quantity][/lineitems][/math]>>>>>>>>>>>> But it did not work.>>>>>>>>>>>> Can someone help??>>>>>>>>>>>>>>>>>> Stuart suggested to use the following,>>>>>>>>>>>> >>>>>>>>>>>> [Orderfile file=file]>>>>>> [Math show=F]BW=0[lineitems]+([lookup>>>>>> db=admin/products.db&lookinfield=SKU&value=[url][sku][/>>>>>> url]&returnfield=WEIGHT]*[quantity])[/lineitems][/Math]>>>>>> [/OrderFile]>>>>>>>>>>>> Then when you need the value call the Math variable ....>>>>>>>>>>>> Here is the total weight = [BW]>>>>>>>>>>>> >>>>>>>>>>>> but it did not work and gives the following error message:>>>>>>>>>>>> Error: Can't open order file. Ignoring [OrderFile] context>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ------------------------------------------------------------->>>>>> This message is sent to you because you are subscribed to>>>>>> the mailing list
.>>>>>> To unsubscribe, E-mail to: >>>>>> To switch to the DIGEST mode, E-mail to>>>>>> >>>>>> Web Archive of this list is at: http://search.smithmicro.com/>>>>>>>>>>> Regards>>>>>>>>>> Stuart Tremain>>>>> idfk web developments>>>>> 114a/40 yeo street neutral bay 2089 australia>>>>> t +612 9908 2134>>>>> f +612 9908 4837>>>>>>>>>>>>>>>>>>>> ------------------------------------------------------------->>>>> This message is sent to you because you are subscribed to>>>>> the mailing list .>>>>> To unsubscribe, E-mail to: >>>>> To switch to the DIGEST mode, E-mail to >>>>> >>>>> Web Archive of this list is at: http://search.smithmicro.com/>>>>>>>>>> -->>>>> This message has been scanned for viruses and>>>>> dangerous content by MailScanner, and is>>>>> believed to be clean.>>>>> ow3>>>>>>>>>>>>>>>> ------------------------------------------------------------->>>> This message is sent to you because you are subscribed to>>>> the mailing list .>>>> To unsubscribe, E-mail to: >>>> To switch to the DIGEST mode, E-mail to >>>> >>>> Web Archive of this list is at: http://search.smithmicro.com/>>>>>>>>>>>>> ------------------------------------------------------------->>> This message is sent to you because you are subscribed to>>> the mailing list .>>> To unsubscribe, E-mail to: >>> To switch to the DIGEST mode, E-mail to >>> >>> Web Archive of this list is at: http://search.smithmicro.com/>>>>>>>> Regards>>>> Stuart Tremain>> idfk web developments>> 114a/40 yeo street neutral bay 2089 australia>> t +612 9908 2134>> f +612 9908 4837>>>>>>>> ------------------------------------------------------------->> This message is sent to you because you are subscribed to>> the mailing list .>> To unsubscribe, E-mail to: >> To switch to the DIGEST mode, E-mail to >> >> Web Archive of this list is at: http://search.smithmicro.com/>>>>> -------------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > > Web Archive of this list is at: http://search.smithmicro.com/>-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/
Associated Messages, from the most recent to the oldest:
i think this will work... note the zero after the [/orderfile] [Math Show=F]BW=0+[!][/!][Orderfile cart=[cart]][!][/!][lineitems]([lookup db=admin/products.db&lookinfield=SKU&value=[url][sku][/ url]&returnfield=WEIGHT]*[quantity])+[!][/!][/lineitems][!][/!][/Orderfile]0[/Math]On Monday, November 18, 2002, at 11:55 PM, Kalin Mintchev wrote:>> On Monday, November 18, 2002, at 11:45 PM, Stuart Tremain wrote:>>> putting [lineitems] after the + will not work as you need a + >> after/before each item to add them all together.>> if that's the idea then the code should be:>>>> [Math Show=F]BW=0+[!]> [/!][Orderfile cart=[cart]][!]> [/!][lineitems]([lookup > db=admin/products.db&lookinfield=SKU&value=[url][sku][/ > url]&returnfield=WEIGHT]*[quantity])+[!]> [/!][/lineitems][!]> [/!][/Orderfile]0[/Math]>> or something like it...>>>>>>>>>> On Tuesday, November 19, 2002, at 03:42 PM, Kalin Mintchev wrote:>>>>>>>> On Monday, November 18, 2002, at 11:18 PM, Eric wrote:>>>>>>> Dear Sturat:>>>>>>>> I changed to:>>>>>>>> [Orderfile cart=[cart]]>>>>>>>> [Math Show=F]BW=0[lineitems]+([lookup>>>> db=admin/products.db&lookinfield=SKU&value=[url][sku][/ >>>> url]&returnfield=WEIGHT]*[quantity])[/lineitems][/Math]>>>>>>>> [/Orderfile]>>>>>> put [lineitems] after the +...>>>>>>>>>>> and no more error message but the [BW] did not show the value when >>>> I call>>>>>>>> Total weight=[BW]>>>>>>>> It merely show Total weight=[BW]. It seems the calculated value >>>> did not store at [BW]>>>>>>>> Regards,>>>>>>>> Eric>>>>>>>> At 02:47 PM 11/19/2002 +1100, you wrote:>>>>> Eric>>>>>>>>>> To use the [lineitems] you must have the equation somewhere inside >>>>> an>>>>> [orderfile].>>>>>>>>>> If your equation works where it is just put this in the same place:>>>>>>>>>> [Math show=F]BW=0[lineitems]+([lookup>>>>> db=admin/products.db&lookinfield=SKU&value=[url][sku][/ >>>>> url]&returnfield=WEIGHT]*[quantity])[/lineitems][/Math]>>>>>>>>>>>>>>> What this does is store the calculated value in a Math variable, >>>>> then>>>>> to call the Math variable ....>>>>>>>>>> Here is the total weight = [BW]>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> On Tuesday, November 19, 2002, at 02:12 PM, Eric wrote:>>>>>>>>>>> Hi,>>>>>>>>>>>> I know this is easy but somehow I am brain dead.>>>>>>>>>>>> I have the following calculation and it gives the correct value>>>>>>>>>>>> [math]0[lineitems]+[lookup>>>>>> db=admin/products.db&lookinfield=SKU&value=[url][sku][/ >>>>>> url]&returnfield=WEIGHT]*[quantity][/lineitems][/math]>>>>>>>>>>>> I wish to store the results in a field (to be called BW) so that >>>>>> I can>>>>>> use this field to display the calculated data and for further>>>>>> calculation.>>>>>>>>>>>> I use>>>>>>>>>>>> [BW]=[math]0[lineitems]+[lookup>>>>>> db=admin/products.db&lookinfield=SKU&value=[url][sku][/ >>>>>> url]&returnfield=WEIGHT]*[quantity][/lineitems][/math]>>>>>>>>>>>> But it did not work.>>>>>>>>>>>> Can someone help??>>>>>>>>>>>>>>>>>> Stuart suggested to use the following,>>>>>>>>>>>> >>>>>>>>>>>> [Orderfile file=file]>>>>>> [Math show=F]BW=0[lineitems]+([lookup>>>>>> db=admin/products.db&lookinfield=SKU&value=[url][sku][/>>>>>> url]&returnfield=WEIGHT]*[quantity])[/lineitems][/Math]>>>>>> [/OrderFile]>>>>>>>>>>>> Then when you need the value call the Math variable ....>>>>>>>>>>>> Here is the total weight = [BW]>>>>>>>>>>>> >>>>>>>>>>>> but it did not work and gives the following error message:>>>>>>>>>>>> Error: Can't open order file. Ignoring [orderfile] context>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ------------------------------------------------------------->>>>>> This message is sent to you because you are subscribed to>>>>>> the mailing list .>>>>>> To unsubscribe, E-mail to: >>>>>> To switch to the DIGEST mode, E-mail to>>>>>> >>>>>> Web Archive of this list is at: http://search.smithmicro.com/>>>>>>>>>>> Regards>>>>>>>>>> Stuart Tremain>>>>> idfk web developments>>>>> 114a/40 yeo street neutral bay 2089 australia>>>>> t +612 9908 2134>>>>> f +612 9908 4837>>>>>>>>>>>>>>>>>>>> ------------------------------------------------------------->>>>> This message is sent to you because you are subscribed to>>>>> the mailing list .>>>>> To unsubscribe, E-mail to: >>>>> To switch to the DIGEST mode, E-mail to >>>>> >>>>> Web Archive of this list is at: http://search.smithmicro.com/>>>>>>>>>> -->>>>> This message has been scanned for viruses and>>>>> dangerous content by MailScanner, and is>>>>> believed to be clean.>>>>> ow3>>>>>>>>>>>>>>>> ------------------------------------------------------------->>>> This message is sent to you because you are subscribed to>>>> the mailing list .>>>> To unsubscribe, E-mail to: >>>> To switch to the DIGEST mode, E-mail to >>>> >>>> Web Archive of this list is at: http://search.smithmicro.com/>>>>>>>>>>>>> ------------------------------------------------------------->>> This message is sent to you because you are subscribed to>>> the mailing list .>>> To unsubscribe, E-mail to: >>> To switch to the DIGEST mode, E-mail to >>> >>> Web Archive of this list is at: http://search.smithmicro.com/>>>>>>>> Regards>>>> Stuart Tremain>> idfk web developments>> 114a/40 yeo street neutral bay 2089 australia>> t +612 9908 2134>> f +612 9908 4837>>>>>>>> ------------------------------------------------------------->> This message is sent to you because you are subscribed to>> the mailing list .>> To unsubscribe, E-mail to: >> To switch to the DIGEST mode, E-mail to >> >> Web Archive of this list is at: http://search.smithmicro.com/>>>>> -------------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > > Web Archive of this list is at: http://search.smithmicro.com/>-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/
Kalin Mintchev
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:
Hiding HTML and page breaks (1997)
Shipping cost out of synch (1998)
[WebDNA] unsubscribe (2008)
NT Version on IIS 4.0 (1997)
problems with 2 tags shakur (1997)
ReturnRaw and redirect (1997)
2nd WebCatalog2 Feature Request (1996)
web hosting (2000)
Formvariable won't update (1999)
Shopping cart problem (2003)
SiteGuard Admin Feature ? (1997)
FEA REQ: One .hdr, multiple .db's (2003)
ampersand XHTML in search (2006)
Max Record length restated as maybe bug (1997)
Emailing html (1998)
search for all (1998)
Re[2]: 2nd WebCatalog2 Feature Request (1996)
Using Applescript to process WebCatalog functions (1998)
Count regular expressions in a file (2007)
Erotic Sites (1997)