grinding code out quickly Peter Boughton wrote: >> <cfloop index="Counter" from="#i#" to="#structCount(session.eformadmin)#"> >> <cfif #form["MGMT_HEADER_"&i]# is not ""> >> <cfset headerId = #form["MGMT_HEADER_"&i]#/> >> <cfelse> >> </cfif> >> <cfset i = i+1/> >> </cfloop> >> > > What's up with that odd looping? :/ > > > It seems like your code could be simplified... > > <cfloop index="i" from="1" to="#StructCount(session.eformadmin)#"> > <cfif StructKeyExists( form , "MGMT_HEADER_"&i ) > AND form["MGMT_HEADER_"&i] is not ""> > <cfset headerId = form["MGMT_HEADER_"&i]/> > </cfif> > </cfloop> > > (with the structkeyexists added where I assume you want it) > > > >
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:313876 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

