you need to assign the struct key name to the id, and the value you wish to
assign to it as its value.  the way you have it now, you're assigning each
id to the key "Service_Scope_ID", which just overwrites the valuse
iteratively.

your code snippet is a bit cryptic, but this is what i THINK you're trying
to do

replace
<cfloop query="select">
<cfset stcTempSS1["Service_Scope_ID"] = "#Service_Scope_ID#">
</cfloop>

with

<cfloop query="select">
<cfset stcTempSS1["#Service_Scope_ID#"] = "#<whatever the field name is
that's associated with ID>#">
</cfloop>

Chris Olive,
DOEHRS Website Administrator 

-----Original Message-----
From: Mike Deane [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 06, 2000 11:06 AM
To: '[EMAIL PROTECTED]'
Subject: newbie:Structure problem


<cfset stcTempSS1 = StructNew()>
<cfset stcSS1 = StructNew()>
<cfset stcActiveListSS1 = StructNew()>

<CFQUERY NAME="Select" DATASOURCE="ProdCenter" USERNAME="sa"
PASSWORD="">
SELECT  *
FROM Service_Scope
</CFQUERY>

<cfloop query="select">
<cfset stcTempSS1["Service_Scope_ID"] = "#Service_Scope_ID#">
</cfloop>

<cfloop index="key" list="#StructKeyList(stcTempSS1)#">
<cfoutput>#stcTempSS1["#key#"]#</cfoutput>
</cfloop>

************************************************************************
***
I want to dynamically create a structure, but this only writes the last
CurrentRow value into my structure.
How do I fill a structure up with many custom key names and values?

Thank you.
/mdeane
----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to