Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
Seth Buntin #1
Cfloop..
I am trying to loop over a list:
<cfquery name="updsyllabus" datasource="#arguments.syl.dsn#">
UPDATE #arguments.syl.tname# SET
<cfloop list="#arguments.syl.cols#" index="x" delimiters=",">
<cfif first is true>
<cfoutput>
#x# = '#arguments.syl.##x##'
</cfoutput>
<cfset first = false>
<cfelse>
<cfoutput>
, #x# = '#arguments.syl.##x##'
</cfoutput>
</cfif>
</cfloop>
WHERE id = '#arguments.syl.id#'
</cfquery>
The error I get is with arguments.syl.##x##. It says:
CFML variable name cannot end with a "." character
How can I format that to work correctly?
Seth Buntin Guest
-
cfloop
The goal is to insert a record into table 'atd', which contains a document id and an associate id, for each document (38) and associate (150). So... -
cfloop error
I am getting an error that is resolving to the closing tag for the </cfloop>. Any Ideas? <cfoutput query="Recordset1" group="category"> <table... -
<cfloop> question
The code below generates a list of form fields for my form. I've been asked to see if it's possible to skip a line after every two form fields. Is... -
to cfloop or not to cfloop?
:confused; I have a list of checkboxes from a form, and a submit button for "Batch Print" The var is "SelectList" and comes out as comma dilimited.... -
CFLOOP/CURRENTROW
I have a LOOP that runs over a query and I use CURRENTROW so that I can then use MOD on it so I can utilize repeating ARRAY data to change the color... -
JMGibson3 #2
Re: Cfloop..
If you're trying to set it to the value of arguments.sysl.whatever, the
following should work:
#x# = '#Evaluate("arguments.syl." & x)#'
If it doesn't work (been awhile for me), set a var ahead of time and use that:
<cfset newVal = Evaluate("arguments.sys.#x#")>
#x# = '#newVal'
JMGibson3 Guest
-
Stressed_Simon #3
Re: Cfloop..
You shouldn't use evaluate() here.
#x# = #arguments.syl[x]#
Is the correct way to use it!
Stressed_Simon Guest
-
Stefan K. #4
Re: Cfloop..
Originally posted by: Stressed_Simon
You shouldn't use evaluate() here.
#x# = #arguments.syl[x]#
Is the correct way to use it!
Stefan K. Guest
-
Seth Buntin #5
Re: Cfloop..
You are right Stressed_Simon. Your solution worked. The other one worked a couple of times but then didn't work so I tried yours and it was successful.
Thanks.
Seth Buntin Guest



Reply With Quote

