Adding to Charlie's advice...
structKeyExists() is faster than isDefined() and I have not found a case
where it couldn't be used instead. It can be used on local values by
checking the variables scope: structKeyExists(variables, "localVarName")
On Jan 21, 2008 1:29 PM, Andy Matthews <[EMAIL PROTECTED]> wrote:
> Get rid of the Evaluate statement.
>
> This: evaluate("form.grp_sort_#myIDX#")
>
> Becomes this: FORM["grp_sort_#myIDX#"]
> or this: FORM["grp_sort_" & myIDX]
>
>
> -----Original Message-----
> From: Les Mizzell [mailto:[EMAIL PROTECTED]
> Sent: Monday, January 21, 2008 12:24 PM
> To: CF-Talk
> Subject: This evaluate thing always stumps me...
>
> This evaluate thing, which doesn't work below, always stumps me..
>
>
> <cfloop index="myIDX" list="#FORM.THISid#">
>
> <cfif IsDefined("evaluate("form.grp_sort_#myIDX#")")
> AND #evaluate("form.grp_sort_#myIDX#")# NEQ "">
>
> <!--- Do something --->
>
> </cfif>
>
>
> .....which, for myIDX = "115", gets you "Variable form.grp_sort_115 is
> undefined".
>
>
> What's the best way to rewrite this so it works..
>
> TIA
>
>
>
>
>
>
>
>
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:297002
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4