Status/Resolution/Reason: Closed/Withdrawn/Duplicate
Reporter/Name(from Bugbase): Sean Corfield / Sean Corfield (Sean Corfield)
Created: 04/23/2012
Components: Language, CFSCRIPT
Versions: 10.0
Failure Type:
Found In Build/Fixed In Build: Public Beta /
Priority/Frequency: Major / Some users will encounter
Locale/System: English / Mac All
Vote Count: 1
Duplicate ID: CF-3808648
Problem Description: When you loop over a query with cfloop, qryname.currentRow is updated for each row and qryName.col is also updated to refer to each row's value of that column. When you use for ( row in qryname ) you can access row.col as expected, and qryname.currentRow still tracks the row number, but qryname.col stays on the first row. That's not consistent.
Steps to Reproduce: Set up a query with one column "name" and three rows: "bob", "dick" "jane" then run this code:
for (friend in friends){
writeoutput('#friends.currentRow#:#friends.recordCount#>#friend.name#-#friends.name#;');
}
Actual Result: 1:3>bob-bob; 2:3>dick-bob; 3:3>jane-bob;
Expected Result: 1:3>bob-bob; 2:3>dick-dick; 3:3>jane-jane;
Any Workarounds:
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3173191
External Customer Info:
External Company:
External Customer Name: SeanACorfield
External Customer Email:
External Test Config: My Hardware and Environment details:
Attachments:
Comments: