评估函数返回" undefined"值

时间:2016-06-27 08:59:40

标签: coldfusion coldfusion-9

以下代码在一个浏览器(IE 11)中返回值,但在不同服务器的浏览器(IE 11)中,它会抛出错误" checkRatingId未定义"。

<cfloop index="FieldName" list="#fieldNames#">
    <cfset field_name = #FieldName#>
    <cfset firstThreeChars = #Mid(field_name,1,3)#>

        <cfif firstThreeChars eq "CQI">
        <cfset checkQuestionId = #RemoveChars(field_name,1,3)#>

        <cfset checkRatingId = #Evaluate("#field_name#")#>

        <cfquery name="InsQuestions" datasource="#variables.dbdsn#" username="#variables.dbuser#" password="#variables.dbpw#">
            insert into quality.employee_quality_call_detail
            (quality_call_detail_id, check_question_id, check_rating_id, quality_call_id,
             last_user, last_update)
            values
            (quality.seq_emp_quality_call_detail.nextval, '#checkQuestionId#','#checkRatingId#',
             '#qualityCallId#', '#currentHRID#',sysdate) 
        </cfquery>

    </cfif>
</cfloop>

0 个答案:

没有答案