Pat Branley wrote:
what about this:
<cfparam name="currentstep" default="2" >
<cfloop list="StructKeyList( validation.registration["step#currentstep#"] )" index="field" >
assuming 'registration' is a struct containting a struct called 'step2'
Pat
"Kay Smoljak" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
Hey everyone,
Here's an interesting pickle... I'm trying to loop over a complex structure containing structures of arrays of structures. Trick is, one of the structure names is dynamic.
I can do this: <cfloop list="#StructKeyList(validation.registration.step1)#"
index="field">
But "step1" (which is a structure, containing a couple of simple values and an array of structures) might actually be "step2". I tried this:
<cfparam name="currentstep" default="2"> <cfset structkey = "validation.registration.step#currentstep#"> <cfloop list="#StructKeyList(evaluate(structkey))#" index="field">
Which gives me the error "Complex object types cannot be converted to simple values."
Any ideas? I'm spewing because I thought I had it all worked out syntactically (it parses, then stops when a variable is not defined) but when I feed real data through it barfs. My brain hurts :(
Thanks, Kay. _____________________________________________________________ Kay Smoljak Web Developer PerthWeb Pty Ltd
Level 9/105 St George's Terrace - Perth - Western Australia Ph: (08) 9226 1366 Fax: (08) 9226 1375
http://www.perthweb.com.au http://developer.perthweb.com.au
--- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia http://www.mxdu.com/ + 24-25 February, 2004
