Am having some un predictable results with a loop.
My code is supposed to copy upload jpegs from a temp folder to the images
Folder. But only one jpeg is being moved from temp folder to images
folder and the loop isn't grabbing any additional pictures.
When the cflock was removed, it grabbed a
ISSUE IS FIXED - THANKS EVERYONE!
~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive:
How are #current_ListingID# and #currentow# getting set? My guess would be
that within your loop over allimages, these are never being changed, so all
these copies are to the same destination file... resulting in only the last
file in the source directory being in the destination directory.
Please be sure to post the fix that was used so that persons using the archive
in the future will be able to troubleshoot their stuff as well.
William
--
William E. Seiter
On May 26, 2010, cfcom cf...@aceligent.com wrote:
ISSUE IS FIXED - THANKS EVERYONE!
I need to send a personalized letter to a list of recipients. Is there a way
to set it up so it can also insert the corresponding 'first name' variable
also?
cfset recipients_email=[EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL
PROTECTED]
cfloop list=#recipients_email# index=recipient
PROTECTED]
Sent: Tuesday, February 26, 2008 6:40 PM
To: CF-Talk
Subject: cfloop question
I need to send a personalized letter to a list of recipients. Is there a
way
to set it up so it can also insert the corresponding 'first name'
variable
also?
cfset recipients_email=[EMAIL PROTECTED], [EMAIL
Thanks Brad, I'll see if I can find an example of what you suggested.
Best
Steve
-Original Message-
From: Brad Wood [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 26, 2008 8:02 PM
To: CF-Talk
Subject: RE: cfloop question
Try creating and looping over a query object instead of a list
) lt Xcfelse;/cfif
/span
cfset X=X+1
/cfloop
-Original Message-
From: Dave Francis [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 05, 2007 7:08 PM
To: CF-Talk
Subject: RE: cfloop question
cfif NOT ThisTerm eq listlast(Record.indexTerms);/cfif
Hey All,
I have a cfloop over a semi colon delimited list
Blah; yadda; whatever
cfloop list=#Record.indexTerms# index=thisTerm delimiters=;
cfset thisTermLink = Replace(thisTerm,*,;,ALL)
span class=rdLinkItema
On 4/5/07, Scott Stewart [EMAIL PROTECTED] wrote:
Hey All,
I have a cfloop over a semi colon delimited list
Blah; yadda; whatever
cfloop list=#Record.indexTerms# index=thisTerm delimiters=;
cfset thisTermLink = Replace(thisTerm,*,;,ALL)
span class=rdLinkItema
why not just type a semi-colon after it? ie. #thisTerm#;
-Original Message-
From: Scott Stewart [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 05, 2007 10:25 AM
To: CF-Talk
Subject: cfloop question
Hey All,
I have a cfloop over a semi colon delimited list
Blah; yadda; whatever
Leaves a trailing semi-colon at the end
-Original Message-
From: Dave Francis [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 05, 2007 1:14 PM
To: CF-Talk
Subject: RE: cfloop question
why not just type a semi-colon after it? ie. #thisTerm#;
-Original Message-
From: Scott
cfif NOT ThisTerm eq listlast(Record.indexTerms);/cfif
-Original Message-
From: Scott Stewart [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 05, 2007 11:41 AM
To: CF-Talk
Subject: RE: cfloop question
Leaves a trailing semi-colon at the end
-Original Message-
From: Dave Francis
Thanks to everyone, CurrentRow did the trick.
- Charles
Charles,
Don't forget that any query object has a few variables built into it
that you can make use of, RecordCount, the total number of records in
a query, and CurrentRow - the current one.
Here's a guess at a query loop that might be
Hello,
I've been trying to do something I would have thought to be easy but it does not appear so.
I have a list of names and I loop through them with the cfloop command to put them in to a form select tag, but I also want to know what possition(count) I'm at.
Example --
select name=fields
= county + 1
/cfloop
/cfoutput
/select
Use QueryName.CurrentRow to get the current row number from your query
_
From: Charles Heizer [mailto:[EMAIL PROTECTED]
Sent: Saturday, August 28, 2004 12:32 AM
To: CF-Talk
Subject: CFLoop question...
Hello,
I've been trying to do something I
Charles,
Don't forget that any query object has a few variables built into it
that you can make use of, RecordCount, the total number of records in
a query, and CurrentRow - the current one.
Here's a guess at a query loop that might be helpful in your case.
Adapt to suit your need.
cfoutput
Hes trying to get the count inside the nested list loop not the cfoutput of
the query
_
From: Nando [mailto:[EMAIL PROTECTED]
Sent: Saturday, August 28, 2004 1:21 AM
To: CF-Talk
Subject: Re: CFLoop question...
Charles,
Don't forget that any query object has a few variables built
I suppose ;)
...tony
tony weeg
senior web applications architect
navtrak, inc.
www.navtrak.net
[EMAIL PROTECTED]
410.548.2337
-Original Message-
From: Mosh Teitelbaum [mailto:[EMAIL PROTECTED]
Sent: Monday, October 27, 2003 5:06 PM
To: CF-Talk
Subject: RE: cfloop question
Hey, you
cfloop from = 1 to = queryName.recordCount index = i
#queryName.currentRow[i]# #queryName.address[i]#
/cfloop
#get.currentRow[i]# for some reason doesn't parse. it errors and tells me
to scalarize myself (well, not really) but shouldn't that works just like im
getting
the other one to parse
index i is the value of currentRow
- Original Message -
From: Tony Weeg
To: CF-Talk
Sent: Tuesday, October 28, 2003 10:18 AM
Subject: cfloop question
cfloop from = 1 to = queryName.recordCount index = i
#queryName.currentRow[i]# #queryName.address[i]#
/cfloop
#get.currentRow[i
Subject: cfloop question
cfloop from = 1 to = queryName.recordCount index = i
#queryName.currentRow[i]# #queryName.address[i]#
/cfloop
#get.currentRow[i]# for some reason doesn't parse. it errors and tells me
to scalarize myself (well, not really) but shouldn't that works just like
im
getting
[mailto:[EMAIL PROTECTED]
Sent: Monday, October 27, 2003 4:18 PM
To: CF-Talk
Subject: cfloop question
cfloop from = 1 to = queryName.recordCount index = i
#queryName.currentRow[i]# #queryName.address[i]#
/cfloop
#get.currentRow[i]# for some reason doesn't parse. it errors and tells me
to scalarize
, 2003 4:24 PM
To: CF-Talk
Subject: Re: cfloop question
index i is the value of currentRow
- Original Message -
From: Tony Weeg
To: CF-Talk
Sent: Tuesday, October 28, 2003 10:18 AM
Subject: cfloop question
cfloop from = 1 to = queryName.recordCount index = i
#queryName.currentRow[i
, 2003 4:31 PM
To: CF-Talk
Subject: RE: cfloop question
Tony:
Put pound signs around your queryName.recordCount in the CFLOOP tag as in:
CFLOOP ... TO=#queryName.recordCount# ...
--
Mosh Teitelbaum
evoch, LLC
Tel: (301) 942-5378
Fax: (301) 933-3651
Email: [EMAIL PROTECTED]
WWW: http
27, 2003 4:31 PM
To: CF-Talk
Subject: RE: cfloop question
Tony:
Put pound signs around your queryName.recordCount in the CFLOOP tag as in:
CFLOOP ... TO=#queryName.recordCount# ...
--
Mosh Teitelbaum
evoch, LLC
Tel: (301) 942-5378
Fax: (301) 933-3651
Email: [EMAIL PROTECTED]
WWW: http
I am looping through items in a shopping cart and need to add up the price
of each item to get a total price. How would I do this? I thought about
setting a variable price per iteration through the loop, but that just
gets overwritten each time. Thanks.
Paul Campano
You can simply add up the column total beforehand. - no need to loop and
add them up etc.
-Original Message-
From: Paul Campano [mailto:[EMAIL PROTECTED]
Sent: 30 June 2003 16:55
To: CF-Talk
Subject: CFLOOP question
I am looping through items in a shopping cart and need to add up
cfset total = 0
cfloop
cfset total = total + price
/cfloop
Mike
- Original Message -
From: Paul Campano [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Monday, June 30, 2003 11:55 AM
Subject: CFLOOP question
I am looping through items in a shopping cart and need to add up
in, there
may even be a function to do it.
--d.
-Original Message-
From: Paul Campano [mailto:[EMAIL PROTECTED]
Sent: Monday, June 30, 2003 11:51 AM
To: CF-Talk
Subject: CFLOOP question
I am looping through items in a shopping cart and need to add up the price
of each item to get a total price
In your loop you can do
cfset TPrice = TPrice + ItemPrice
I am looping through items in a shopping cart and need to add up the
price
of each item to get a total price. How would I do this? I thought
about
setting a variable price per iteration through the loop, but that
just
gets
cfset total = 0
cfloop from=1 to=whatever index=i
cfset total = total + yourPrice
/cfloop
Something along those lines should work.
Ade
-Original Message-
From: Paul Campano [mailto:[EMAIL PROTECTED]
Sent: 30 June 2003 16:55
To: CF-Talk
Subject: CFLOOP question
I am looping
How about if you put # sign's around insert_counter in
the first cfswitch expression?
Heidi
--- JB Mentzer [EMAIL PROTECTED] wrote:
Hi all
I'm attempting to overwrite the index value of a
CFLOOP from within the
loop:
CFLOOP FROM=1 TO=288 INDEX=insert_counter
STEP=1
!--- skip gaps
Hi all
I'm attempting to overwrite the index value of a CFLOOP from within the
loop:
CFLOOP FROM=1 TO=288 INDEX=insert_counter STEP=1
!--- skip gaps in case value numbering ---
CFSWITCH EXPRESSION=insert_counter
CFCASE VALUE= 23
CFSET insert_counter = 26
/CFCASE
CFCASE VALUE=194
I have a database with (amongst other things) a table:
tblProduct
ProductDescription and GroupCode
another table:
tblGroup
GroupCode and GroupDescription
The database is updated regularly
there are 31 GroupCodes but sometimes (and this varies) one or more
GroupCodes have zero
tblGroup.GroupCode from tblGroup left outer join tblProduct
on tblGroup.GroupCode = tblProduct.GroupCode
Hope this helps.
John Hancock
-Original Message-
From: Seamus Campbell [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 09, 2001 8:29 PM
To: CF-Talk
Subject: cfloop question (I think)
I have
this helps.
John Hancock
-Original Message-
From: Seamus Campbell [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 09, 2001 8:29 PM
To: CF-Talk
Subject: cfloop question (I think)
I have a database with (amongst other things) a table:
tblProduct
ProductDescription and GroupCode
another table
Don't try to change a loop index.
Use a CASE tag to take care of the cases for which an action is required, as
you do for VALUE=1. Don't provide a CASE tag for the values for which no
action is required.
And don't forget the pound signs around the expression:
EXPRESSION=#insert_counter#
Just to recap, on a form I have:
INPUT type="checkbox" name="AO_ORDER" value="1" INPUT type="text"
name="AO_QUANT"
INPUT type="checkbox" name="AO_ORDER" value="2" INPUT type="text"
name="AO_QUANT"
INPUT type="checkbox" name="AO_ORDER" value="3" INPUT type="text"
name="AO_QUANT"
INPUT
After working on field names on the form a bit, Jim McAtee's solution works
great. Thanks Jim, I really appreciate it...
cfparam name="form.AO_ORDER" default=""
cfloop index="ITEM" list="#form.AO_ORDER#"
cfif IsDefined("form.AO_QUANT_#item#")
cfset QUANTITY =
I've had good luck using CFLOOP to run through a list of checkboxes and
write single values to record rows in a database.
However, I've now got a PAIR of checkbox/text field that needs to write to
the same row.
Record in database is set up like:
IDA0_ORDERAO_QUANT
On my page,
ted in the loop.
|-Original Message-
|From: Les Mizzell [mailto:[EMAIL PROTECTED]]
|Sent: Thursday, March 08, 2001 9:04 PM
|To: CF-Talk
|Subject: CFLOOP Question/Problem
|
|
|I've had good luck using CFLOOP to run through a list of
|checkboxes and
|write single values to record rows in a d
|cfset list1 = "1,2,3,4"
|cfset list2 = "mom,pop,dad,sis"
|
|cfset counter = 1
|cfloop index="qty" list="#list1#"
| cfoutput
| Counter = #counter# Qty = #qty#
|list2 = #ListGetAt(list2, counter)#br
| /cfoutput
| cfset counter = counter + 1
|/cfloop
Yea, I believe a modification of
eq 0
cfquery name="ORDERS" datasource="AO_LITERATURE"
INSERT INTO PRODUCT_ORDERS (ORDER_ID, AO_ORDER, AO_QUANT)
VALUES ('#CLIENT_ID#', '#item#', '#quantity#')
/CFQUERY
/cfif
/cfif
/cfloop
Jim
- Original Message -
From: "Les Mizzell&q
is there a way to find out what row i am on in a cfloop?
Like inside my loop, call a condition like this
cfloop query="test" startrow="1" endrow="#rows.RecordCount#"
cfif cfloop.row EQ 1
We are on row 1
cfelse cfloop.row GT 1
We are not on row 1
Kevin,
You can use cfoutput query and then refer to the currentrow
attribute.
John Stanley
~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives:
/cfif
cfset counter = counter + 1
/cfloop
Brian
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 08, 2001 8:45 AM
To: CF-Talk
Subject: Easy CFLOOP Question
is there a way to find out what row i am on in a cfloop?
Like inside my loop, call
Since you are looping over a query, I believe that you can use the
queryname.currentrow variable.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 08, 2001 8:45 AM
To: CF-Talk
Subject: Easy CFLOOP Question
is there a way to find out what row i
]
To: "CF-Talk" [EMAIL PROTECTED]
Sent: Monday, January 08, 2001 8:44 AM
Subject: Easy CFLOOP Question
is there a way to find out what row i am on in a cfloop?
Like inside my loop, call a condition like this
cfloop query="test" startrow="1" endrow="#rows.RecordCo
cfloop query="test" startrow="1" endrow="#rows.RecordCount#"
cfoutput#test.currentrow#/cfoutput
/cfloop
From: [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Subject: Easy CFLOOP Question
Date: Mon, 08 Jan 2001 08:44:48 EST
is there a
rows.currentrow
(assuming the rows is the name of your query)
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 08, 2001 8:45 AM
To: CF-Talk
Subject: Easy CFLOOP Question
is there a way to find out what row i am on in a cfloop
Yes, use currentRow.
Hal Helms
== See www.ColdFusionTraining.com for info on "Best Practices with
ColdFusion Fusebox" training, Jan 22-25 ==
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 08, 2001 8:45 AM
To: CF-Talk
Subject: E
PROTECTED]
To: "CF-Talk" [EMAIL PROTECTED]
Sent: Monday, January 08, 2001 9:00 AM
Subject: Re: Easy CFLOOP Question
queryName.recordCount
Check on line documentation (look at cfquery) for more information.
Marius Milosav
www.scorpiosoft.com
It's not about technology, it's about p
Hi All,
Here is the situation:
I have a query that is giving about 5 results. They
all have a id. Therefore, I am getting 5 ids as a
result of the query.
How do I append it into a list automatically? Can
someone help?
What would I do if I don't know how many number of
id's I am going to get ?
dList=ValueList(Q.id)
CFSET idCount=Q.RecordCount
-Rick
-Original Message-
From: aslam bajaria [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 01, 2000 4:35 PM
To: [EMAIL PROTECTED]
Subject: cfloop question
Hi All,
Here is the situation:
I have a query that is giving about 5 results
--02EDDFCBC443DB118DB040CB
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sorry about all the detail. I just thought it would make it easy to
explain my problem.
I am doin g two queries in a loop 1 to get main items and one to get
item details. I am
At 03:51 AM 7/7/00 -0400, you wrote:
Sorry about all the detail. I just thought it would make it easy to
explain my problem.
Detail is our friend.
I am doin g two queries in a loop 1 to get main items and one to get
item details. I am trying to get them to match by the two fields
57 matches
Mail list logo