• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

cfml -- cfevaluate problem

INDEX is a previously defined variable, part of a loop, and gets incremented each pass.


I'm getting 'criteria_string_2' does not exist. (assuming index=2)

<CFSET evaluate("criteria_string_#index# = "#form.search_box#"")>


However, Something like this works fine for me.

<CFSET evaluate("form.caption_#INDEX# = ''")>


What am I doing wrong here? Do I need to cfparam the criteria_string_#index# variable first?
 
I don't know the exact semantics of what you're doing but two quotes often causes problems as it sometimes is treated by the preprocssor as literal " in text.

Have you tried using the escape sequence for quote. If that's what you want?

Code:
<CFSET evaluate("criteria_string_#index# = \"#form.search_box#\"")>
 
Back
Top