I don't know why this parameter can't be determined value. Help, please!

Oh. Sorry, I have a trouble again. Here, one of the parameter can't be determined value. I checked it several times and couldn't find the problem. Can you help me?

Here is one of the question of the survey, there are several answers, I gave them name as Att11. On the next page, I insert the answer got from the user to the database. But Att11 can't be determined.

 11. Since the end of 2001, our principal corporate officers have
            (check all that apply) </p>
          <blockquote>
             <cfinput type="checkbox" name="Att11" value="a" >
            a. had direct with federal elected/appointed officials regarding textile
            industry issues<br>
            <cfinput type="checkbox" name="Att11" value="b" >
            b. contributed to federal election compaigns of candidated expressing
            a desire to assist textile industry issues.<br>
             <cfinput type="checkbox" name="Att11" value="c" >
            c. asked members of your state's Congressional delegation directly
            for assistance with textile industry issues.


<cfset Att1='#form.Att1#'>
<cfset Att2='#form.Att2#'>
<cfset Att3='#form.Att3#'>
<cfset Att4='#form.Att4#'>
<cfset Att5='#form.Att5#'>
<cfset Att6='#form.Att6#'>
<cfset Att7='#form.Att7#'>
<cfset Att8='#form.Att8#'>
<cfset Att9='#form.Att9#'>
<cfset Att10='#form.Att10#'>
<cfset Att11='#form.Att11#'>
<cfset Att12='#form.Att12#'>
</cfif>

<cfquery datasource="WDSurvey">
update tblTextile
set Att1='#Att1#',
Att2='#Att2#',
Att3='#Att3#',
Att4='#Att4#',
Att5='#Att5#',
Att6='#Att6#',
Att7='#Att7#',
Att8='#Att8#',
Att9='#Att9#',
Att10='#Att10#',
Att11='#Att11#',
Att12='#Att12#'
Where Firmid='#session.firmid#'
</cfquery>

Why the other variables can be determined, only the Att11 can't?
xiaobingAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

James RodgersWeb Applications DeveloperCommented:
are you sure that q11 had a sellection made?

if so try this instead of what you have

<cfquery datasource="WDSurvey">
update tblTextile
set Att1='#form.Att1#',
Att2='#form.Att2#',
Att3='#form.Att3#',
Att4='#form.Att4#',
Att5='#form.Att5#',
Att6='#form.Att6#',
Att7='#form.Att7#',
Att8='#form.Att8#',
Att9='#form.Att9#',
Att10='#form.Att10#',
Att11='#form.Att11#',
Att12='#form.Att12#'
Where Firmid='#session.firmid#'
</cfquery>
0
xiaobingAuthor Commented:
Jester_48, I can't tell what's the difference from mine and yours. I tried yours, the problem remains the same.

I was told: An error occurred while evaluating the expression:

 Att11='#form.Att11#'

I can't figure it out now. Thanks!

0
James RodgersWeb Applications DeveloperCommented:
the form field att11 was not submitted to the processing page
either the formfield name is not att11 or there was no selection made for the formfield att11

the difference between my suggestion and your code is that there is one less step and everytime you create a variable <cfset variableName= someValue> you are using system resources, and in this case you are assigning variable values to which you already have access to a second, redundant variable, it is not necessary
0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

xiaobingAuthor Commented:
No, the form field att11 was submitted since I only used one form to submit all the variables. The other 11 variables work fine, only this one.

Also, I checked the firmfield name, it really is Att11.
0
PE_CF_DEVCommented:
If a check box is not checked the form variable is not passed you will want to do an Isdefined() for each form value.

<cfquery datasource="WDSurvey">
update tblTextile
set
<cfif isdefined("form.Att1">
      Att1='#form.Att1#'
</cfif>
<cfloop from=2 to=12 step=1 index="index">
      <cfif isdefined("'form.Att#index#")>
            ,Att#index#='#evaluate('form.Att1'&index)#
      </cfif>
</cfloop>
Where Firmid='#session.firmid#'
</cfquery>
0
James RodgersWeb Applications DeveloperCommented:
use this to see which formfileds are being passed and their values


<CFIF ISDefined("Form.Fieldnames")>
  <table border="1">
    <CFOUTPUT>
      <CFLOOP Index="FieldName" List="#Form.Fieldnames#">
        <tr><td>Form.#FieldName#</td> <td>#Evaluate(FieldName)#&nbsp;</td></tr>
      </CFLOOP>
    </CFOUTPUT>
  </table>
</CFIF>
0
PE_CF_DEVCommented:
quick correction for my code:
<cfif isdefined("form.Att1">

Should be:
<cfif isdefined("form.Att1")>
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
James RodgersWeb Applications DeveloperCommented:
have you tested the new code?

are you still getting the error?
0
anandkpCommented:
I dont see why u are setting the form values before updating teh DB.
y the unnecessary processing ???

u'll need to have just the following code ... with 2 checks :

<CFQUERY datasource="WDSurvey">
      update tblTextile Set      
      <CFIF IsDefined('Att1') AND Len(Trim(Evaluate('Att1')))>
            Att1 = <CFQUERYPARAM CFSQLTYPE="cf_sql_varchar" VALUE="#Evaluate('Att1')#">,
      </CFIF>
      <CFIF IsDefined('Att2') AND Len(Trim(Evaluate('Att2')))>
            Att2 = <CFQUERYPARAM CFSQLTYPE="cf_sql_varchar" VALUE="#Evaluate('Att2')#">,
      </CFIF>
      <CFIF IsDefined('Att3') AND Len(Trim(Evaluate('Att3')))>
            Att3 = <CFQUERYPARAM CFSQLTYPE="cf_sql_varchar" VALUE="#Evaluate('Att3')#">,
      </CFIF>
      <CFIF IsDefined('Att4') AND Len(Trim(Evaluate('Att4')))>
            Att4 = <CFQUERYPARAM CFSQLTYPE="cf_sql_varchar" VALUE="#Evaluate('Att4')#">,
      </CFIF>
      <CFIF IsDefined('Att5') AND Len(Trim(Evaluate('Att5')))>
            Att5 = <CFQUERYPARAM CFSQLTYPE="cf_sql_varchar" VALUE="#Evaluate('Att5')#">,
      </CFIF>
      <CFIF IsDefined('Att6') AND Len(Trim(Evaluate('Att6')))>
            Att6 = <CFQUERYPARAM CFSQLTYPE="cf_sql_varchar" VALUE="#Evaluate('Att6')#">,
      </CFIF>
      <CFIF IsDefined('Att7') AND Len(Trim(Evaluate('Att7')))>
            Att7 = <CFQUERYPARAM CFSQLTYPE="cf_sql_varchar" VALUE="#Evaluate('Att7')#">,
      </CFIF>
      <CFIF IsDefined('Att8') AND Len(Trim(Evaluate('Att8')))>
            Att8 = <CFQUERYPARAM CFSQLTYPE="cf_sql_varchar" VALUE="#Evaluate('Att8')#">,
      </CFIF>
      <CFIF IsDefined('Att9') AND Len(Trim(Evaluate('Att9')))>
            Att9 = <CFQUERYPARAM CFSQLTYPE="cf_sql_varchar" VALUE="#Evaluate('Att9')#">,
      </CFIF>
      <CFIF IsDefined('Att10') AND Len(Trim(Evaluate('Att10')))>
            Att10 = <CFQUERYPARAM CFSQLTYPE="cf_sql_varchar" VALUE="#Evaluate('Att10')#">,
      </CFIF>
      <CFIF IsDefined('Att11') AND Len(Trim(Evaluate('Att11')))>
            Att11 = <CFQUERYPARAM CFSQLTYPE="cf_sql_varchar" VALUE="#Evaluate('Att11')#">,
      </CFIF>
      <CFIF IsDefined('Att12') AND Len(Trim(Evaluate('Att12')))>
            Att12 = <CFQUERYPARAM CFSQLTYPE="cf_sql_varchar" VALUE="#Evaluate('Att12')#">,
      </CFIF>
      0 = 0      
      Where Firmid = <CFQUERYPARAM CFSQLTYPE="cf_sql_varchar" VALUE="#session.firmid#">
</CFQUERY>

run this & let me know - if it works for u !

K'Rgds
Anand

PS : PE_CF_DEV  in ur code - if the Att1 is not defined - ur SQL statement wld throw error, as it wld look like "set , att2 = ...." starting with a "," !
0
hartCommented:
What ever anand has written will work perfectly... like a charm

but just in case, do check the view source of ur form.
that is after ur form is formed just right click and do a view source.

And check for the instance of Att11.
also check wether its inside the form tags or not...

Regards
Hart
0
PE_CF_DEVCommented:
oh yeah, I knew it wouldn't work went to get coffe came back and submited without thinking and forgot all about it...
0
James RodgersWeb Applications DeveloperCommented:
mrichmon,
i think the proper answer to this question is Anand's, even PE_CF_DEV admits that his code can have unwanted results,so teh points should be awarded to anand

Jester_48  
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Servers

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.