I've got a structure containing coordinates for a grid. I've named each line
for the person who should appear at those coordinates. I've found a function
called "StructFindValue()" that "says" it can do what I need, but everytime
I try to use it, I get an error.
According to the docs it "Searches recursively through a substructure of
nested arrays, structures, and other elements for structures with values
that match the search key in the value parameter.".
It says that it returns "An array that contains structures with values that
match the search key value. If none are found, returns an array of size 0."
I determined that I can't use it in a CFIF statement because it returns an
array. So how would I go about "finding" a key containing the value? Here's
my code listed below:
<cfset us = StructNew()>
<cfset us["andy"] = "62|-213">
<cfset us["jones"] = "207|-86">
<cfset us["cherry"] = "42|-220">
<cfdump var="#StructFindValue(us,"62|-213")#">
<cfif StructFindValue(us,"62|-213","ALL")>
gotcha
</cfif>
<!----------------//------
andy matthews
web developer
certified advanced coldfusion programmer
ICGLink, Inc.
[EMAIL PROTECTED]
615.370.1530 x737
--------------//--------->
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:241604
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54