> Hi all,
>
> I'm stuck on the syntax for this. I have a structure. What I'm trying to
> do is loop over a query, and create a new structure (dynamically named
> with the primary key of the record as a structure key) with three values
> from that record. I think I must be doing something wrong syntax-wise,
> and I can't find any examples in the docs or the archives.
>
> I have tried these (within a query loop):
> <cfset payment.[due.pkWebUser] = StructNew()>
> <cfset payment.evaluate(due.pkWebUser) = StructNew()>
> <cfset payment.#due.pkWebUser# = StructNew()>
>
> But nothing is working so far. Any ideas on how to do this or how it can
> be done easier?
>

Try this. Just had a similar problem...

<cfset payment["#due.pkWebUser#"] = StructNew()>

Then when you want to set a key, you can just do:

<cfset variables.temp = StructInsert(payment["#due.pkWebUser#"], "keyName",
"value")>

Hope this helps,
Dave.
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to