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 a quantity 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 is in stock and one with a quantity of the difference). I think I am working out the code well, 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---[/!] [SetLineItem cart=[cart]&index=[lineindex]&db=products.db]quantity=[NumInStock][/SetLineItem] [AddLineItem cart=[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 each lineitem I pass a yes or no for this variable depending on whether or not the item is in stock. Easy to make the name of the hidden variable unique for each lineitem when handling a lineitem that has not just been split up (... etc. ) ... but when creating the new lineitem in the above [!]--START split up---[/!]....see above....[!]--END split up---[/!], how do I determine what is 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:

    
  1. 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 a quantity 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 is in stock and one with a quantity of the difference). I think I am working out the code well, 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---[/!] [SetLineItem cart=[cart]&index=[lineindex]&db=products.db]quantity=[NumInStock][/SetLineItem] [AddLineItem cart=[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 each lineitem I pass a yes or no for this variable depending on whether or not the item is in stock. Easy to make the name of the hidden variable unique for each lineitem when handling a lineitem that has not just been split up (... etc. ) ... but when creating the new lineitem in the above [!]--START split up---[/!]....see above....[!]--END split up---[/!], how do I determine what is 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

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:

Date search bug (1998) [WebDNA] Ubuntu 14.04 & WebDNA (2017) Aquick question about replace (1999) Dark Horse Comics success story (1997) Location of Browser Info.txt file (1997) Webcat serving error page? (2000) Search returns all, not 20 (1997) too many nested tags ... (1997) WebCat2b12plugin - [search] is broken ... not! (1997) Alternative colors? (2000) WebCatalog 4.0.1b1 is now available (2000) [math] variable question (1997) What file? (1997) WC2.0 Memory Requirements (1997) suggestions (1998) List Archives (2000) lookup and two records? (1997) WC 4.0 (2000) [SMSI] WebDNA is too good to go away! (2006) Cant open pages generated by Webcat (2004)