Here's what I wound up doing: moved from session to variables scope in another function
<cffunction name="outdoorDrama_insertUserExperience" access="public" output="no" returntype="any"> <cfargument name="FK_ID"/> <cfloop condition="#i# LTE #variables.counter#"> <cfif StructKeyExists(variables,'year_'&i)> <cfset arguments['year_'&i] = variables['year_'&i]> </cfif> <cfif StructKeyExists(variables,'play_'&i)> <cfset arguments['play_'&i] = variables['play_'&i]> </cfif> <cfif StructKeyExists(variables,'po_'&i)> <cfset arguments['po_'&i] = variables['po_'&i]> </cfif> <cfif StructKeyExists(variables,'role_'&i)> <cfset arguments['role_'&i] = variables['role_'&i]> </cfif> <cfquery name="OD_InsertUserExperience" datasource="#variables.dbSource#"> INSERT INTO APPLICANT_EXPERIENCE (FK_APP_ID,P_YEAR,PLAY,PO,ROLE) VALUES (<cfqueryparam cfsqltype="cf_sql_integer" value="#arguments.FK_ID#">, <cfqueryparam cfsqltype="cf_sql_integer" value="#Evaluate('arguments.year_'&i)#">, <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#Evaluate('arguments.play_'&i)#">, <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#Evaluate('arguments.po_'&i)#">, <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#Evaluate('arguments.role_'&i)#">) </cfquery> <cfset i = i+1> </cfloop> </cffunction> Scott Stewart wrote: > Confused programmer is confused (just because the title sounds like > LOLSpeak) > > I've got this little piece of code that dynamically creates and > populates a structure key pair, based on what's sent from a form with a > dynamically > generated set of fields (javascript "add row") > > For (i=1;i LTE Form.PE_Counter; i=i+1) > > if(StructKeyExists(FORM,'play_'&i)){ > session.NODA09_formStruct['play_'&i] = form['play_'&i]; > > } > > I know that the arguments in a cf function are very particular about > their placement, can I use similar code to create and populate arguments? > > -- Scott Stewart ColdFusion Developer Office of Research Information Systems Research & Economic Development University of North Carolina at Chapel Hill Phone:(919)843-2408 Fax: (919)962-3600 Email: saste...@email.unc.edu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:317305 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4