Hello Chris,
The error message is pretty straight forward: It is telling you that array index value
21 does not exist.
It is telling you that you have index values of 1 through to and including 20. So
before you can check for a value you must create the array element.
What you could do is create the element with a default value and if it is that default
value then the item has not been added.
hth,
Nelson
Chris Farrugia wrote:
> I have an array that catalogues a bunch of products and categories... for
> instance, ProductIDArray[1][1] is "Case" and ProductIDArray[1][2] could be
> "Mid Tower." With that in mind, this is for a system configurator... now,
> there are checkboxes for SOftware... if they check one, then it goes into
> the productIDArray... if they check two, then ProductIDArray[21][1] becomes
> Additional Software and ProductIDArray[21][2] becomes two product ID's like
> 131,132. So... all I want to do is say "If ProductIDArray[21][2] has a
> value, then do the following..."
>
> How can I do that? The code I'm trying is:
>
> <CFIF len(#ProductIDArray[21][2]#) IS NOT 0>
>
> This comes back with the following error...
>
> Error Diagnostic Information
>
> The element at position 21 in dimension 1 of object "ProductIDArray" cannot
> be found. The object has elements in positions 1 through 20. Please, modify
> the index expression.
>
> The error occurred while evaluating the expression:
>
> len(#ProductIDArray[21][2]#) IS NOT 0
>
> ------------------------------------------------------------------------------
> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
>message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.