Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ColdFusion / Getting Started / November 2008



Tip: Looking for answers? Try searching our database.

Referencing a query in a nested struct

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
LuLu620 - 30 Nov 2007 19:27 GMT
I have a nested struct that is being brought back from a component. It looks
like this

office_struct[ floor1_struct[ some query results] floor2_struct[some query
results] ....]

I am trying to reference the query so I can print it out to screen. How would
I do that?

I know for a normal nested sctruct I can use dot notation.
 i.e office_struct.floor1_struct.value = #office_struct[floor1_struct].value#
Ian Skinner - 30 Nov 2007 20:59 GMT
You can usually do the same thing, but I know in version past, and I do
not know if it has yet been resolved, that some tags that expect a query
variable get confused if the query is nested in too complex a data
structure.  For this I have just referenced the complex query value with
a simple local variable name and then used that in the tags needing a
reference to the query.

I.E.

If <cfoutput query="office_struct.floo1_struct" ....> does not work try:

<cfset variables.localQuery = office_struct.floor_struct>
<cfoutput query="variables.localQuery"....>
Tak72 - 24 Nov 2008 16:17 GMT
i think i have a similar problem, but in my case, i have a struct within a query object

i encountered it by upgrading to CF8, until version 7.02 worked fine...
Tak72 - 24 Nov 2008 16:17 GMT
i think i have a similar problem, but in my case, i have a struct within a query object

i encountered it by upgrading to CF8, until version 7.02 worked fine...
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.