[Top] [All Lists]

Re: Struct question

Subject: Re: Struct question
From: "Marc E"
Date: Sun, 12 Aug 2007 21:00:05 -0400
Newsgroups: macromedia.coldfusion.cfml_general_discussion
I believe you're looking for something like this. The key is to remember 
that s.outdata is an array, so you're looping through an array, not a 
collection. that's why the loop through the collection didn't work.

<cfloop from="1" to="#ArrayLen(mydata.outdata)#" index="i">

Good luck.

Marc Esher

"dkerr" <[email protected]> wrote in message 
news:[email protected]
> The above link is a dump of a struct passed to my CFC function from Flex
> Object . [flex object is made up of many form item strings and one
> arraycollection called outdata] .  But, this is not a Flex side question 
> for
> me. It is a CFC-side question.
> <cfargument name="mydata" type="Struct" required="true"/>
> How do I loop through the  outdata in mydata?  I need to loop through each
> subscribers name and email and insert their name and email into the 
> subscribers
> table in the database.  Not sure of syntax of the looping to reference the
> outdata data?
> I played with cfloop collection ="mydata"  and cfscript for-in loops, but 
> I
> keep getting complex data errors.  Obviously, I don't understand how to 
> loop
> through complex data structs.
> If you could help, I'd be grateful.
> Don Kerr

<Prev in Thread] Current Thread [Next in Thread>