I've had that same issue with nested queries, I think CF can only reference 
the innermost query.  Others will probably have more info.  Also, your 
cfoutputs are nested, is that ok in CF7?  I think that would cause an error 
in earlier versions but seems to work in CF7.

-- Josh



----- Original Message ----- 
From: "Rick Root" <[EMAIL PROTECTED]>
To: "CF-Talk" <cf-talk@houseoffusion.com>
Sent: Wednesday, February 22, 2006 9:16 AM
Subject: cfloop over a query inside cfoutput over a query


> Consider the following code:
>
>
> <cfoutput query="getRoster" group="ENTITYID">
> <cfset volunteers = getVolunteers(ENTITYID)>
> <!-- volunteers is a query --->
> <cfoutput><!-- output some stuff here --></cfoutput>
> <cfloop query="volunteers">
> foo bar #ENTITYID#
> </cfloop>
> </cfoutput>
>
> The reference to ENTITYID inside the cfloop breaks, says it doesn't
> exist.  Is that because CF only looks at the current query being looped
> over?
>
> It works fine if I add something like <cfset thisEntityID = ENTITYID>
> just after the first cfoutput line and then reference *THAT* variable
> instead.
>
> Just seems odd.
>
> Rick
>
> 

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