Yeah, I know “He’s back again” :-)
Anyways, I’m trying loop over a set of form fields, stopping the loop when I hit a specific blank field. (This field is automatically populated from another form for each record the user wants to insert, it could be 1 it could be as many as 9. There are check box fields that may or may not show up. Which is why the IsDefined is there. However I get the error at the bottom. Any suggestions? <cfinclude template="../common/CreateGUID.cfm"> <cfset i = 0> <cfloop condition="#attributes["clientID" & i]# neq ''"> <cfset guid= #CreateGUID()#> <cfinclude template="qry_getClientinfo.cfm"> <cfquery name="" datasource="#application.dsrc1#"> INSERT INTO projpart (apk_pptid ,fk_clnid ,fk_prjid ,client ,company ,ecs_office <cfif IsDefined("attributes["invoice" & i]") eq "Yes">,invoice</cfif> ,part ,concrete ,medfr) VALUES ('#guid#' ,'#qry_getClientInfo.apk_clnid#' ,'#cookie.PRJID#' ,'#attributes["clientID" & i]#' ,'#attributes["coName" & i]#' , '#qry_getClientInfo.ecs_office#' <cfif IsDefined("attributes["invoice" & i]") eq "Yes">,#attributes["invoice" & i]#</cfif> ,#attributes["part" & i]# ,'#attributes["concrete" & i]#' ,'#attributes["medfr" & i]#') </cfquery> <cfset i=i+1> </cfloop> Invalid CFML construct found on line 15 at column 62. ColdFusion was looking at the following text:<p>invoice</p><p>The CFML compiler was processing:<ul><li>an expression beginning with "IsDefined", on line 15, column 39.This message is usually caused by a problem in the expressions structure.<li>a cfif tag beginning on line 15, column 34.<li>a cfif tag beginning on line 15, column 34.</ul> Scott A. Stewart, Web Application Developer Engineering Consulting Services, Ltd. (ECS) 14026 Thunderbolt Place, Suite 300 Chantilly, VA 20151 Phone: (703) 995-1737 Fax: (703) 834-5527 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.11.9 - Release Date: 05/12/2005 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:206596 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54