Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

"CF Best Practice:  avoid evaluate()" .... so can someone suggest an alternative for this?

Posted on 2006-03-24
2
Medium Priority
?
681 Views
Last Modified: 2013-12-24
Is there a better way?  Thanks as always!

<cfset var.fileList="">
<cfloop index="i" from="1" to="#form.fileUploadNo#">
   <cfset var.fileList = listAppend(var.fileList,evaluate('form.myfile#i#'))>
</cfloop>
0
Comment
Question by:whaleyk
2 Comments
 
LVL 35

Accepted Solution

by:
mrichmon earned 400 total points
ID: 16284990
<cfset var.fileList="">
<cfloop index="i" from="1" to="#form.fileUploadNo#">
   <cfset var.fileList = listAppend(var.fileList,evaluate('form.myfile#i#'))>
</cfloop>

becomes

<cfset var.fileList="">
<cfloop index="i" from="1" to="#form.fileUploadNo#">
   <cfset var.fileList = listAppend(var.fileList['form.myfile' & i]))>
</cfloop>
0
 

Author Comment

by:whaleyk
ID: 16285036
BEAUTIFUL ... and FAST ... thanks mrichmon :-)
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question