I'm trying to go through a list of fields and determine whether they
exist or not.  They' re mostly checkboxes.  If they exist, I want to
give it a value of 1, otherwise initialize it with a value of 0.  It
fails on the isDefined line.  If I take out the if and just have the
evaluate(), it fails on that too.  Here's a shortened example of the
code.

<cfset checkExists = "plan_to_attend,contact,alumnimember">
<cfset checkExists = listtoArray(checkExists)>

<cfloop index="i" from="1" to="#arrayLen(checkExists)#">
<cfset theVar = "#checkExists[i]#">

<cfif IsDefined("#evaluate('#theVar#')#")>
<cfset evaluate('#theVar#') = 1>
<cfelse>
<cfset evaluate('#theVar#') = 0>
</cfif>
</cfloop>

Any help is appreciated or if i can explain better please ask.

thanks.

daniel

--
Daniel Kessler

Department of Public and Community Health
University of Maryland
Suite 2387 Valley Drive
College Park, MD  20742-2611
301-405-2545 Phone
www.phi.umd.edu
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to