> I have a structure "lines"
> 
> when I dump that it shows me structure under structure.
> 
> when I dump "lines.2" it also shows me the other elements 
> inside that structure.
> like 
> 
> struct
> ADDRESS  ABC BLVD
> CITY  Toronto
> COMPANY  ABC Company
> COUNTRY  CANADA
> FNAME  My Firstname
> LNAME  My Lastname
> STATE  ON
> ZIP  myzip/postal code.
> 
> when i try to reference that variable directly like 
> #lines[2]['Address']#
> 
> it gives me an error.
> Element Address is undefined in a CFML structure referenced 
> as part of an expression.
> 
> 
> When I tried
> #lines.2.address#
> 
> Element 2.ADDRESS is undefined in LINES.

"2" is not a valid variable name. If you use dot notation with structures
and their members, you must use valid CF variable names for those members.
If you want to use arbitrary strings for those members, you must use array
notation:

lines["2"]

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized 
instruction at our training centers in Washington DC, Atlanta, 
Chicago, Baltimore, Northern Virginia, or on-site at your location. 
Visit http://training.figleaf.com/ for more information!


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:194313
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to