how to know the [LineIndex] number webcat generated during a [AddLineItem]?
This WebDNA talk-list message is from
2000
It keeps the original formatting.
numero = 26161
interpreted = N
texte = Hi :-)This looks tricky but is not really.On my invoice template I check to see if any lineitem in the person's OderFile has aquantity which is greater than what is in stock... (I store the stock# in the products.db)If so, I want to break the lineitem into 2 lineitems (one with a quantity equal to what isin stock and one with a quantity of the difference). I think I am working out the codewell, but am stuck on this one point-...we're now inside a [showif] context (which is inside the OrderFile's [lineitems] context)which only executes when the lineitem does need to be split into 2 lineitems.[!]--START split up---[/!][SetLineItemcart=[cart]&index=[lineindex]&db=products.db]quantity=[NumInStock][/SetLineItem][AddLineItemcart=[cart]&sku=[SKU]&db=products.db]quantity=[NumOuttaStock]&textA=[textA]&textB=[textB]&textC=[textC][/AddLineItem][!]--END split up---[/!]I am ready to test, but how can I get the proper name for that hidden input? For eachlineitem I pass a yes or no for this variable depending on whether or not the item is instock. Easy to make the name of the hidden variable unique for each lineitem when handlinga lineitem that has not just been split up (... etc. ) ... but when creating the newlineitem in the above[!]--START split up---[/!]....see above....[!]--END split up---[/!], how do I determine whatis the LineIndex number for the lineitem webcat just added while executing the[AddLineItem]...[/AddLineItem]?-John-------------------------------------------------------------Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server.To end your Mail problems go to .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
Associated Messages, from the most recent to the oldest:
how to know the [LineIndex] number webcat generated during a [AddLineItem]? (John Butler 2000)
Hi :-)This looks tricky but is not really.On my invoice template I check to see if any lineitem in the person's OderFile has aquantity which is greater than what is in stock... (I store the stock# in the products.db)If so, I want to break the lineitem into 2 lineitems (one with a quantity equal to what isin stock and one with a quantity of the difference). I think I am working out the codewell, but am stuck on this one point-...we're now inside a [showif] context (which is inside the OrderFile's [lineitems] context)which only executes when the lineitem does need to be split into 2 lineitems.[!]--START split up---[/!][SetLineItemcart=[cart]&index=[lineindex]&db=products.db]quantity=[NumInStock][/SetLineItem][AddLineItemcart=[cart]&sku=[SKU]&db=products.db]quantity=[NumOuttaStock]&textA=[textA]&textB=[textB]&textC=[textC][/AddLineItem][!]--END split up---[/!]I am ready to test, but how can I get the proper name for that hidden input? For eachlineitem I pass a yes or no for this variable depending on whether or not the item is instock. Easy to make the name of the hidden variable unique for each lineitem when handlinga lineitem that has not just been split up (... etc. ) ... but when creating the newlineitem in the above[!]--START split up---[/!]....see above....[!]--END split up---[/!], how do I determine whatis the LineIndex number for the lineitem webcat just added while executing the[addlineitem]...[/AddLineItem]?-John-------------------------------------------------------------Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server.To end your Mail problems go to .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 John Butler
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...