IsDefined doesn't work on array syntax. For arrays you have to use
try/catch to see if the index exists in the array. Keep in mind that in
CF, once a variable exists, it always has a value. Maybe you are
thinking abaout empty strings when you say "no value" (although empty
strings are a value). Then right after testing if the array index
exists, check for the Len() IF it exists. You could make it into a
function (look at http://www.cflib.org/udf.cfm/ArrayDefinedAt).

> -----Original Message-----
> From: Asim Manzur [mailto:[EMAIL PROTECTED]
> Sent: maandag 7 juni 2004 19:12
> To: CF-Talk
> Subject: IsDefined(Array[element])
>
> how to check is the array element is defined or not
>  
> <cfif IsDefined('lineout["#xyz#"]')>
>  
> according to the coldfusion documentation it will always
> return false, no matter even the element has a value.
>  
> what is the alternate way to see that the element has a value
> or undefined.
>  
> thanks.
>
>  
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to