Well your original code should have worked as well. Also note you could
do:

isDefined("form.sernum" & i)

as well as structKeyExists(form,"sernum#i#")

=======================================================================
Raymond Camden, ColdFusion Jedi Master for Hire

Email    : [EMAIL PROTECTED]
WWW      : www.camdenfamily.com/morpheus
Yahoo IM : morpheus

"My ally is the Force, and a powerful ally it is." - Yoda 

> -----Original Message-----
> From: Brian Scandale [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, November 25, 2002 3:18 PM
> To: CF-Talk
> Subject: Re: -isDefined() finesse
> 
> 
> Sorry, just worked it out...
> 
> <-cfif isDefined("Form.SerNum"&"#i#")>
> 
> 
> At 01:11 PM 11/25/02, you wrote:
> >I am trying to see if a particular dynamic variable is 
> defined... but having trouble building the ifDefined argument.
> >
> >Form.SerNum1
> >Form.SerNum2
> >Form.SerNum3 ...etc. are built dynamically and then passed 
> to an action form below like below.
> >
> ><-cfloop index="i" from="1" to="#theSerNums.RecordCount#">
> >        <-cfif isDefined("Form.SerNum#i#")>
> >                DoSomething
> >        <-cfelse>
> >                DoSomethingElse
> >        <-/cfif>
> ><-/cfloop> 
> >
> >
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Reply via email to