Evaluate function
cfloop, coldfusion
Solution
<cfloop list="#qry.Columnlist#" index="FieldName">
<cfset form[FieldName] = qry[FieldName][1]>
</cfloop>
?
Problem
Is there a better way to write the following? ``` <cfloop list="#qry.Columnlist#" index="FieldName"> <cfset "form.#FieldName#" = Evaluate("qry.#FieldName#")> </cfloop> ``` This loop is assigning every field in the query to a corresponding form field. I understand the evaluate function is shunned.