Solved

Help please <cfloop issue

Posted on 2014-02-21
8
175 Views
Last Modified: 2014-02-26
Hi,

How can I pass my counter thru this loop.
the files name that I have are:
file_1
file_2
file_3

 <cfset maxFiles = 3>
 
 <cfloop from="1" to="#maxFiles#" index="counter">
 
  <cfdump var="#Form.file_#counter#">

 </cfloop>
0
Comment
Question by:lulu50
  • 4
  • 4
8 Comments
 
LVL 4

Expert Comment

by:Rodrigo Munera
ID: 39877700
You can use brackets:

#form["file_" & counter]#
0
 

Author Comment

by:lulu50
ID: 39878003
no I can't
0
 

Author Comment

by:lulu50
ID: 39878024
Error Occurred While Processing Request
File '' does not exist.

 value="#FileReadBinary(form["file_" & counter])#">


can't use double cote
0
 
LVL 4

Expert Comment

by:Rodrigo Munera
ID: 39878029
use single quote

value="#FileReadBinary(form['file_' & counter])#">
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 4

Expert Comment

by:Rodrigo Munera
ID: 39878033
Or the other way around:

value='#FileReadBinary(form["file_" & counter])#'>
0
 

Author Comment

by:lulu50
ID: 39886841
no I still have an error

The tag must be nested inside a cfquery tag.

I tried:

 <cfqueryparam cfsqltype="cf_sql_blob"
              value='#FileReadBinary(form["file_" & counter])#'>

and this

<cfqueryparam cfsqltype="cf_sql_blob"
              value="#FileReadBinary(form['file_' & counter])#">
0
 
LVL 4

Accepted Solution

by:
Rodrigo Munera earned 500 total points
ID: 39886909
You can't save files like that,
you must first upload the file to your server
https://wikidocs.adobe.com/wiki/pages/viewpage.action?pageId=87505342

and then you can use filereadbinary
https://wikidocs.adobe.com/wiki/display/coldfusionen/FileReadBinary
0
 

Author Closing Comment

by:lulu50
ID: 39888879
Thanks
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Hi, Even though I have created this Tutorial on My personal Blog, Some people might not able to find my website, So here i am posting it again Today, from the topic it is very clear that i will be showing you here the very basic usage of how we …
CFGRID Custom Functionality Series -  Part 1 Hi Guys, I was once asked how it is possible to to add a hyperlink in the cfgrid and open the window to show the data. Now this is quite simple, I have to use the EXT JS library for this and I achiev…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

910 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now