> If so, you cal use an evaluate within the loop:
Or you can do it without using evaluate() by using summat like:
Replace this:
evaluate('dropship'&indexvalue&'_value')
With this:
variables['dropship'&indexvalue&'_value']
That assumes that the vars are in the variables scope - if they're
coming from a form then it'll be form['...'] etc.
Tim.
---
Try the ColdFusion Coding Contest! Current contest:
Maze Solver - http://tech.badpen.com/cfcontest/
---
RAWNET LTD - Internet, New Media and ebusiness Gurus.
WE'VE MOVED - for our new address, please visit our
website at http://www.rawnet.com/ or call us any time
on 0800 294 24 24.
---
This message may contain information which is legally
privileged and/or confidential. If you are not the
intended recipient, you are hereby notified that any
unauthorised disclosure, copying, distribution or use
of this information is strictly prohibited. Such
notification notwithstanding, any comments, opinions,
information or conclusions expressed in this message
are those of the originator, not of rawnet limited,
unless otherwise explicitly and independently indicated
by an authorised representative of rawnet limited.
---
> -Original Message-
> From: Michael Dinowitz [mailto:[EMAIL PROTECTED]
> Sent: 28 January 2004 14:04
> To: CF-Talk
> Subject: Re:CFIF inside of CFLOOP
>
>
> Let me see if I get this straight. You've got
> dropship1_value, dropship2_value, etc. If so, you cal use an
> evaluate within the loop:
> evaluate('dropship'&indexvalue&'_value')
> The evaluate function will take the two pieces of text and
> the variable, combine them into a single variable name and
> then get the value of that variable name.
> 1. 'dropship'&indexvalue&'_value'
> 2. 'dropship1_value'
> 3. value of dropship1_value
>
> > I am faced with a puzzle that should be fairly easy to solve.
> >
> >
> >
> >
> >
> > #Qty1_Value#
> >
> >
> > #Desc1_Value#
> >
> > Yes
> >
> > Yes
> >
> > ''>#ItemDateShipped1_Value#
> >
> > Yes
> >
> > ''>#ItemDateOrdered1_Value#
> >
> > Yes
> >
> > Yes
> >
> > #DollarFormat(Price1_Value)#
> >
> >
> >
> >
> > I want to repeat that same code a total of 15 times. I tried to use
> > CFLOOP from=1 to=15 going through my query, but I don't know how to
> > properly call the index within those CFIF tags.
> >
> > For example, where it has Price1_Value, I want it to be
> something like
> > Price#indexvalue#_Value so that it'll work 1 through 15.
> >
> > So right now, I have that same code copied 15 times... talk about
> > bloat!
> >
> > I'd love the help. Thanks.
>
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]