Title:
[ANeff] Bug for: <cfloop> missing the maxrows attribute (tag-to-script conversion failure)
| View in TrackerStatus/Resolution/Reason: To Track//NeedMoreInfo
Reporter/Name(from Bugbase): Aaron Neff / Aaron Neff (Aaron Neff)
Created: 12/07/2014
Components: Language
Versions: 11.0
Failure Type: Non Functioning
Found In Build/Fixed In Build: CF11_Final /
Priority/Frequency: Major / Some users will encounter
Locale/System: ALL / Platforms All
Vote Count: 0
Tag code <cfoutput query="q" maxrows="x"..> doesn't have a cfscript equivalent b/c cfloop() doesn't support maxrows.
Repro:
<cfset q = queryNew("myColumn", "varchar", [["a"],["b"],["B"],["c"],["C"]])>
<cfoutput query="q" group="myColumn" groupcasesensitive="no" startrow="2" maxrows="2">#q.myColumn#</cfoutput><!--- outputs: bc (good) --->
<cfscript>
//fails w/ exception: It does not allow the attribute(s) MAXROWS. The valid attribute(s) are ARRAY,CHARACTERS,CHARSET,COLLECTION,CONDITION,DELIMITERS,ENDROW,FILE,FROM,GROUP,GROUPCASESENSITIVE,INDEX,ITEM,LIST,QUERY,STARTROW,STEP,TO.
cfloop(query="q", group="myColumn", groupcasesensitive=false, startrow=2, maxrows=2) {
writeOutput(q.myColumn);
}
//outputs: b (tag-to-script conversion failure, b/c endrow doesn't offer a valid workaround)
cfloop(query="q", group="myColumn", startrow=2, endrow=2) {
writeOutput(q.myColumn);
}
</cfscript>
Note: While cfoutput(query="q", maxrows=2) currently works (even tho the cfscript doc says it's not supported), cfoutput() should be deprecated (once cfloop() supports maxrows) b/c cfoutput() doesn't offer a replacement for <cfoutput>foo</cfoutput>.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3863533
Reason: BugVerified
External Customer Info:
External Company:
External Customer Name: itisdesign
External Customer Email:
Attachments:
Comments: