Bracket [] notation.

Config.SiteConfig.SiteSections[Sections.Name]


--------------
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA

"C code. C code run. Run code run. Please!"
- Cynthia Dunning



...-----Original Message-----
...From: James Smith [mailto:[EMAIL PROTECTED]
...Sent: Monday, January 17, 2005 8:56 AM
...To: CF-Talk
...Subject: Dynamic variable name (WAS: XML Variable Issue)
...
...A related issue (at a completely diferent point in the code)...
...
...If the SectionName is dynamic, how would you access the variable?
...
...For example the Variable name
..."Config.SiteConfig.SiteSections.UserManager.XmlText" has the
..."UserManager"
...part in another variable called "Sections.Name".  I have tried many
...options
...and variations with no success and I know this is easy as I have done it
...before (although not from XML) and I can't remember how!
...
...EG:
...<cfif parameterExists(Config.SiteConfig.SiteSections.#Sections.Name#)>
...<cfif parameterExists(evaluate("Config.SiteConfig.SiteSections." &
...Sections.Name))>
...
...--
...Jay
...
...> If you are using it like that you need to .XmlText on the end
...> to get the XmlText part of the XmlNode.
...>
...> Config.SiteConfig.SiteSections.UserManager.XmlText
...>
...> And as it is text and not a boolean value I think you will
...> need to use:
...>
...>  <cfif Config.SiteConfig.SiteSections.UserManager.XmlText IS "TRUE">
...>
...> Andrew.
...
...
...
...

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:190763
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

Reply via email to