Try one of these.
// Using the fieldnames list
for(field=1;field LTE listlen(fieldnames), field=field+1)
{
    if (listgetat(fieldnames, field) contains "d_price")
    {
        do d_price work using listgetat value
    }
}

// using the form structure
for (field in form)
{
    if (field contains "d_price")
    {
        do d_price work using form[field]
    }
}

> I am sending 12 d_price all sequentially numbered...trying to learn how
> handle such...and there are 25 other fields coming with it...  :-)
>
>
> Regards,
>
> Eric J Hoffman
> DataStream Connexion
> www.datastreamconnexion.com
> Delivering Creative Data Solutions
>
> -----Original Message-----
> From: Michael Dinowitz [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, February 02, 2003 1:04 PM
> To: CF-Talk
> Subject: Re: Obvious cfscript ?
>
>
>
> 1.  The form variable is a structure, not an array.
> 2. You can look over the variable "fieldnames" which is a list of all
> form fields sent. What formfields are being sent? More than one d_price?
>
> > New to monkeying with cfscript...and must be missing the obvious
> > today:
> >
> > This is not resolving...meaning form.d_price[i] resolves as
> > form.d_price rather than form.d_price1 in the first loop. <cfscript>
> > for (i=1; i LTE form.clientloop; i = i +1)
> > line_total[i] = form.d_price[i] * form.qty[i];
> > </cfscript>
> >
> > What am I forgetting?
> >
> > Regards,
> >
> > Eric J Hoffman
> > DataStream Connexion
> > www.datastreamconnexion.com
> > Delivering Creative Data Solutions
> >
> >
> >
> >
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to