And without evaluate....

<cfset str = "Betterhalf.firstname">

#myStruct['#listfirst(str, '.')#']['#listlast(str, '.')#']#

-----Original Message-----
From: Ewok [mailto:[EMAIL PROTECTED] 
Sent: Saturday, May 21, 2005 7:37 PM
To: CF-Talk
Subject: RE: Dynamic Struct/Query Path

<cfset str = "betterhalf.firstname">

#evaluate('myStruct.#str#')#

-----Original Message-----
From: Kevin Aebig [mailto:[EMAIL PROTECTED] 
Sent: Saturday, May 21, 2005 6:41 PM
To: CF-Talk
Subject: Dynamic Struct/Query Path

Hey all,

I'm trying to build the path to a value stored in struct / query.

<cfset myStruct = StructNew>
<cfset myStruct.firstname = John>
<cfset myStruct.lastname = Doe>
<cfset myStruct.Betterhalf = StructNew>
<cfset myStruct.Betterhalf .firstname = Jane>
<cfset myStruct.Betterhalf .lastname = Doe>


if I have "betterhalf.firstname" as a string variable and a reference to
myStruct, how do I get the value. I can't seem to get it to go using
Evaluate...

Any ideas?

Cheers,

Kevin






~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:207366
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