<CFIF IsDefined("form.Item") AND IsDefined("form.ItemQty")>
        <cfset ItemArray = ListToArray(Item)>
        <cfset ItemQtyArray = ListToArray(ItemQty)>
        <CFIF ArrayLen(ItemArray) EQ ArrayLen(ItemQtyArray)>
                <CFLOOP FROM="1" TO="#ArrayLen(ItemArray)#" INDEX="Idx">
                        <CFOUTPUT>
                                #ItemQtyArray[variables.Idx]#
#ItemArray[variables.Idx]#<BR>
                        </CFOUTPUT>
                </CFLOOP>
        <CFELSE>
                The Items list and Quantities list do not have the same
number of values.
        </CFIF>
</CFIF>

-----Original Message-----
From: Keith Purtell [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 02, 2002 11:45 AM
To: KCFusion (E-mail)
Subject: [KCFusion] Parsing two lists


This should be simple but my code keeps failing. I have a form that sends
multiple values for the same form field. They arrive at my processing
template as two lists; one for the item being ordered and another for
quantity.

Field name     Value
----------     ----------------------
Item           Servers,Modems,Printers
ItemQty        8,6,5


The output I seek is:
8 Servers
6 Modems
5 Printers

I can't change the sending form; it's a mixture of CF, HTML and JavaScript
that has been declared final. However I'd like assistance with the
processing end. Any tips on the easiest way to approach this?

Keith Purtell, Web/Network Administrator
VantageMed Operations (Kansas City)
Email:  [EMAIL PROTECTED]

CONFIDENTIALITY NOTICE: This email message, including any attachments, is
for the sole use of the intended recipient(s) and may contain confidential
and privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient, please
contact the sender by reply email and destroy all copies of the original
message.

 
 
______________________________________________________________________
The KCFusion.org list and website is hosted by Humankind Systems, Inc.
List Archives........ http://www.mail-archive.com/cf-list@kcfusion.org
Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED]
To Subscribe.................... mailto:[EMAIL PROTECTED]
To Unsubscribe................ mailto:[EMAIL PROTECTED]
 
 
 
______________________________________________________________________
The KCFusion.org list and website is hosted by Humankind Systems, Inc.
List Archives........ http://www.mail-archive.com/cf-list@kcfusion.org
Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED]
To Subscribe.................... mailto:[EMAIL PROTECTED]
To Unsubscribe................ mailto:[EMAIL PROTECTED]
 

Reply via email to