Spencer, Go ahead and reset your counter to start at 0, your form sends itself that way, so your processing page should also mimick it.
William ::-----Original Message----- ::From: Spencer Liddle [mailto:[EMAIL PROTECTED] ::Sent: Tuesday, September 16, 2008 3:51 PM ::To: CF-Newbie ::Subject: Re: Element ... is undefined in a Java object of type class ::coldfusion.filter.FormScope... :: ::I set my loop to start at 1. :: ::<cfloop index="iCounter" from="1" to="#(iParamCount - 1)#"> :: ::Causing: :: ::--Error-- :: ::Error Executing Database Query. ::[Macromedia][SQLServer JDBC Driver][SQLServer]Incorrect syntax near the ::keyword 'GROUP'. :: ::The error occurred in F:\Inetpub\wwwroot\cm_search_companies_query.cfm: ::line 647 ::Called from F:\Inetpub\wwwroot\cm_search_companies_query.cfm: line 1 ::Called from F:\Inetpub\wwwroot\cm_view_companies.cfm: line 530 ::Called from F:\Inetpub\wwwroot\cm_view_companies.cfm: line 1 ::Called from F:\Inetpub\wwwroot\cm_search_companies_query.cfm: line 647 ::Called from F:\Inetpub\wwwroot\cm_search_companies_query.cfm: line 1 ::Called from F:\Inetpub\wwwroot\cm_view_companies.cfm: line 530 ::Called from F:\Inetpub\wwwroot\cm_view_companies.cfm: line 1 :: ::645 : ) ::646 : </cfif> ::647 : </cfif> ::648 : GROUP BY ::649 : tblCompanies.ID, :: :: :: ::---- :: ::--Code-- :: ::<cfquery name="qryCompanies" datasource="McCauleyDB"> ::SELECT ::tblCompanies.ID, ::dbo.GetCompanyName(tblCompanies.ID) AS Name, ::tblCompanies.IsDealer, ::tblCompanies.WasDealer, ::tblCompanies.Discount, ::tblCompanies.IsRecertified ::FROM ::tblCompanies ::LEFT JOIN ::tblPeople AS Contacts ::ON ::tblCompanies.ID = Contacts.CompanyID ::<cfif bAddCriteria> ::WHERE #PreserveSingleQuotes(sAllParams)# ::<cfif Not HasPermission("View contact list")> ::AND tblCompanies.ID IN ::( ::SELECT ::CompanyID ::FROM ::tblAddresses ::WHERE ::Zip IN ::( ::SELECT ::Zip ::FROM ::dbo.RepZips(#Client.UserID#) ::) ::UNION ::SELECT ::CompanyID ::FROM ::tblPeople ::WHERE ::ID IN ::( ::SELECT ::PersonID ::FROM ::tblAddresses ::WHERE ::Zip IN ::( :: SELECT :: Zip :: FROM :: dbo.RepZips(#Client.UserID#) ::) ::) ::) ::</cfif> ::</cfif> ::GROUP BY ::tblCompanies.ID, ::dbo.GetCompanyName(tblCompanies.ID), ::tblCompanies.IsDealer, ::tblCompanies.WasDealer, ::tblCompanies.Discount, ::tblCompanies.IsRecertified ::ORDER BY ::NEWID() ::</cfquery> :: :: ::Thanks, :: ::Spencer :: ::---- :: ::>Spencer, ::> ::>All this error is really telling you is that the form field did not ::appear ::>in the form scope. If you do a <cfdump var="#form#"> and you don't see ::it ::>there, then you have to hunt backwards. Now, go look at your form code ::and ::>try to find the field there. Maybe something is misspelled, either on ::the ::>action page, or on the form page, but that's the only way you can track ::down ::>this specific type of error. ::> ::>Element param0Metric is undefined in a Java object of type class ::>coldfusion.filter.FormScope referenced as ::> ::>Simply means that: form.param0Metric is not defined. ::> ::>Hope this helps. ::> ::>Dave ::> ::>coldfusion.filter.FormScope... ::> ::>Thanks for the quick reply Dave! ::> ::>I tried it out and got two new errors. This first comes from the same ::page ::>referencing Metric(what does this mean). I have hunted high and low but ::>can't find what metric means. ::> ::>The second error comes from another page. This page searches companies ::>based on search conditions selected via drop down boxes. ::> ::>This problem is like trying to herd cats... ::> ::>---- First Error ---- ::> ::>Element param0Metric is undefined in a Java object of type class ::>coldfusion.filter.FormScope referenced as ::> ::> ::>The error occurred in F:\Inetpub\wwwroot\cm_search_companies_query.cfm: ::line ::>63 ::>Called from F:\Inetpub\wwwroot\cm_search_companies_query.cfm: line 60 ::>Called from F:\Inetpub\wwwroot\cm_search_companies_query.cfm: line 57 ::>Called from F:\Inetpub\wwwroot\cm_search_companies_query.cfm: line 26 ::>Called from F:\Inetpub\wwwroot\cm_search_companies_query.cfm: line 7 ::>Called from F:\Inetpub\wwwroot\cm_search_companies_query.cfm: line 1 ::>Called from F:\Inetpub\wwwroot\cm_view_companies.cfm: line 530 ::>Called from F:\Inetpub\wwwroot\cm_view_companies.cfm: line 1 ::> ::>61 : <cfcase value="current"> ::>62 : <cfset iStandardParamCount = ::>iStandardParamCount + 1> ::>63 : <cfif ::>Form["param#iCounter#Metric"] EQ "is"> ::>64 : <cfset ::>sStandardParam[iStandardParamCount] = "tblCompanies.IsDealer = 1"> ::>65 : <cfelse> ::> ::>----Second Error---- ::> ::>Element param0Status is undefined in a Java object of type class ::>coldfusion.filter.FormScope referenced as ::> ::> ::>The error occurred in F:\Inetpub\wwwroot\cm_search_companies_query.cfm: ::line ::>60 ::>Called from F:\Inetpub\wwwroot\cm_search_companies_query.cfm: line 57 ::>Called from F:\Inetpub\wwwroot\cm_search_companies_query.cfm: line 26 ::>Called from F:\Inetpub\wwwroot\cm_search_companies_query.cfm: line 7 ::>Called from F:\Inetpub\wwwroot\cm_search_companies_query.cfm: line 1 ::>Called from F:\Inetpub\wwwroot\cm_view_companies.cfm: line 530 ::>Called from F:\Inetpub\wwwroot\cm_view_companies.cfm: line 1 ::> ::>58 : ::>59 : <cfcase value="dealer_status"> ::>60 : <cfswitch ::>expression="#Form['param#iCounter#Status']#"> ::>61 : <cfcase value="current"> ::>62 : <cfset iStandardParamCount = ::>iStandardParamCount + 1> ::> ::> ::> ::>Thank You, ::> ::>Spencer ::> ::>---------- :: :: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:4001 Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
