I fixed my typo but I'm still getting errors with the code below. The error
I now get reads: "Element 1 is undefined in a CFML structure referenced as
part of an expression."
I'm sure this is a simple fix... What am I missing?
-----Original Message-----
Basically, I have nested structures. I want to check if the nested structure
exists first. If it does not exist, then I'll create it. Then I want to
check if the nested structure's "tickler" value is "Y". Obviously, my cfif
logic is not correct. Thanks!
<cfif NOT isDefined("stWSSB_Tickler")>
<cfset stWSSB_Tickler = structNew()>
</cfif>
<cfloop from="1" to="#arrayLen(xmlcontent.message.items.item)#" index="x">
<cfif NOT structIsEmpty(stWSSB_Tickler[x])>
<cfif structFind(stWSSB_Tickler[x], "tickler") NEQ "Y">
<cfset stWSSB_Tickler[x] = structNew()>
<cfset stWSSB_Tickler[x].ord_qty =
xmlcontent.message.items.item[x].ord_qty.xmlText />
<cfset stWSSB_Tickler[x].unit_price =
xmlcontent.message.items.item[x].unit_price.xmlText />
<cfset stWSSB_Tickler[x].tickler = "Y" />
</cfif>
</cfif>
</cfloop>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 &
Flex 2
Free Trial
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:281128
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4