Thanks Dave. FTR, I never asked them to change anything specifically for me,
I simply tried to let them know there was a problem. The service has worked
well for me for about a year and then started to return inconsistent
results.

Question for you: would ArrayIsDefined work when the # of elements in the
array are different as I loop through the results? That is the case here, I
believe.

-----Original Message-----
> Since I am the mercy of the web service (they have not listened to my 
> inquiries w/regards to this) ...

You can't really expect them to change how their web service works to suit
you, can you? That might negatively affect all the people currently using
the web service.

If the problem is that you don't have a specific array element, and you
don't know about it until runtime, you will have to check to see if that
array element exists. If you're using CF 8, there's a new function
specifically for that, ArrayIsDefined:

http://livedocs.adobe.com/coldfusion/8/htmldocs/functions_a-b_12.html#517684
5

Otherwise, you'll need to simply try to reference the element, and catch the
exception that occurs when it's not there.

Since this specific array element is within an XML document, you might use
XML-specific functionality instead. For example, you could use XmlSearch
with the appropriate XPath expression to find matching nodes.

Dave Watts


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Check out the new features and enhancements in the
latest product release - download the "What's New PDF" now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293280
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to