Have you considdered using a Structure in stead of an array?

You can then i believe use StructKeyExists to test with a key has been
created

-----Original Message-----
From: Chris Farrugia [mailto:[EMAIL PROTECTED]]
Sent: 29 June 2000 02:05
To: [EMAIL PROTECTED]
Subject: Arrays and CFIF


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.

Reply via email to