Naming a ColdFusion variable beginning with a number
The naming rules for creating ColdFusion variables are found here in the LiveDocs. The first bullet point is
- A variable name must begin with a letter, underscore, or Unicode currency symbol.
<!--- <cfset 00N30000000dqFd = "test"> ---> <!--- variable starting with number throws error: "00N30000000dqFd," on line 3, column 8, is not a valid identifer name. --->
<cfparam name="form.#field#" default=""> <!--- paraming "00N30000000dqFd" in the form scope is ok --->
<cfdump var="#form#" label="after param">
<!--- <cfset "form.#field#" = "new value"> ---> <!--- doing this cfset method throws an error: The string "form.00N30000000dqFd" is not a valid ColdFusion variable name. --->
<cfset form["#field#"] = "1st value"> <!--- doing the structure method sets the variable ok --->
<cfdump var="#form#" label="after assigning">
<!--- <cfif IsDefined("form.#field#")> <!--- doing this IsDefined() method of checking if the variable exists in the Form scope throws an error: Parameter 1 of function IsDefined, which is now "form.00N30000000dqFd", must be a syntactically valid variable name.--->
<cfset "form.#field#" = "2nd value">
</cfif>--->
<cfif StructKeyExists(form,field)> <!--- doing this structure key check method is ok --->
<cfset form["#field#"] = "2nd value">
</cfif>
<cfdump var="#form#" label="end of demo">
Here is a demo of this in action.

http://www.aylak.com