When you set the struct value, you are using qGetPageList.PK_page_id.
This gets EVALUATED to be the value of the query cell. But, then when
you do the data grid, you are trying to find the key
"qGetPageList.PK_page_id". This is the actual string (name of variable),
but NOT the value of the original cell value. 

I am not famililar with CFGridRow, but I think you might be better
looping over the query itself to great the grid rather than a structure?


......................
Ben Nadel
Certified Advanced ColdFusion MX7 Developer
www.bennadel.com
 
Need ColdFusion Help?
www.bennadel.com/ask-ben/

-----Original Message-----
From: Scott Stewart [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 09, 2007 4:34 PM
To: CF-Talk
Subject: Building a structure dynamically from a query

Hey all, 

 

I'm building a structure dynamically from a query:

 

<cfquery name="qGetPageList" datasource="#request.dsn#">

SELECT *

            FROM tbl_page_indentifier

</cfquery>

<!--- creates structure to list pages --->

<cfset pageStruct=StructNew()>

<cfloop query="qGetPageList">

<cfset
Temp=StructInsert(pageStruct,qGetPageList.PK_page_id,qGetPageList.page_i
d_na
me,TRUE)>

</cfloop>

Then trying to loop over it to build a cfgrid

 

<cfloop collection="pageStruct" item="">

         <cfgridrow data ="#StructFind(pageStruct,
"qGetPageList.PK_page_id")#,#StructFind(pageStruct,
qGetPageList.page_id_name)#">

    </cfloop>

 

And I get this error

 


500 Cannot find key qGetPageList.PK_page_id in struct.


Cannot find key qGetPageList.PK_page_id in struct.

 

 

Any ideas?

 





Scott Stewart
ColdFusion Developer 

HYPERLINK
"http://maps.yahoo.com/py/maps.py?Pyt=Tmap&addr=7241+Jillspring+Ct&csz=S
prin
gfield%2C+VA.+22152&country=us" \n7241 Jillspring Ct Springfield, VA.
22152 


HYPERLINK "mailto:[EMAIL PROTECTED]"
[EMAIL PROTECTED] HYPERLINK "http://www.sstwebworks.com";
\nhttp://www.sstwebworks.com 


tel: 
mobile: 

HYPERLINK
"http://www.plaxo.com/click_to_call?src=jj_signature&To=703-912-3076&Ema
il=s
[EMAIL PROTECTED]" \n703-912-3076 HYPERLINK
"http://www.plaxo.com/click_to_call?src=jj_signature&To=703-220-2835&Ema
il=s
[EMAIL PROTECTED]" \n703-220-2835 

 



HYPERLINK
"https://www.plaxo.com/add_me?u=25770055805&src=client_sig_212_1_card_jo
in&i
nvite=1" \nAlways have my latest info

HYPERLINK "http://www.plaxo.com/signature?src=client_sig_212_1_card_sig";
\nWant a signature like this?

 


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.8/714 - Release Date: 3/8/2007
10:58 AM
 
  




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 and Flex 2 
Build sales & marketing dashboard RIA’s for your business. Upgrade now
http://www.adobe.com/products/coldfusion/flex2

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:272244
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to