Try copying the query to a temp variable within your loop.

<cfset tmpQry = arr_alljobs[thisIndex].qry_candidates>

Then, use tmpQry to loop over the query itself.

M!ke 

-----Original Message-----
From: Protoculture [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 17, 2005 4:51 AM
To: CF-Talk
Subject: Re: nested array and structure loop inside cfmail....

Any ideas out there? basically having problems looping over a query
object contained in a structure that is contained in an array.


> > Could you post a dump of a sample structure?
> 
> Sure, here is a picture of the structure ( personal info removed )
> 
> http://www.visualreality.ca/images/problem.gif
> 
> The problem is that my code ( shown below ) never ends up looping over

> that structure located inside the array. Although I believe my syntax 
> is correct. As I stated before, the error message I get is very vauge.
> I've used both the collection loop and a query loop to loop over that 
> query object and I get the same error.
> 
> is this a CF bug?
> 
> <cfmail to="#theemail#" from="#thefrom#" subject="Response Listing" 
> type="html">
> 
>                       <div align="left">
>                       
>                       <!--- loop through all the jobs --->
>                       <cfloop from="1" to="#arraylen(arr_AllJobs)#"
index="i">
>                       
>                       <b>JOB TITLE :</b>
#arr_AllJobs[i].job_title#<br>
>                       <b>JOB REFERENCE :</b>
#arr_AllJobs[i].job_ref#<br>
>                       <b>JOB VIEWS:</b> #arr_AllJobs[i].job_views#<br>
>                       <b>JOB RESPONSES:</b>
#arr_AllJobs[i].job_responses#<br>
>                       <b>DATE POSTED:</b>
#arr_AllJobs[i].job_datePosted#<br><br>
>                       
>                       <b>RESPONSE BREAKDOWN:</b><br>
>                       
>                               <cfloop
collection="#arr_AllJobs[i].qry_candidates#" 
> item="j"><!--- loop through all responses --->
>                               
>                               <a
> href="mailto:#urlDecode(candidate_email)#">#urlDecode(candidate)#</a>
> (#urlDecode(candidate_email)#)
>                               
>                               </cfloop>
>                                                       
>                       </cfloop>
>                       
>                       </div>
>                       
                        </cfmail>

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