Adobe Livecycle Designer Javascript Calculation

Adobe Livecycle Designer Javascript Calculation

本文关键字:Calculation Javascript Designer Livecycle Adobe      更新时间:2023-09-26

下面的if语句不适用于在Adobe Livecycle Designer中设置为计算的数字字段,我无法弄清楚。我所有的字段名称都是准确的,并且这些字段都设置为数字。它一直显示值 0。

任何帮助或指导,不胜感激。

if (RadioButtonList.btn2.selectedIndex == 0 || RadioButtonList.btn4.selectedIndex == 0) {
this.rawValue = ((Table3.Row1.Cell3 * NumericField1) / Table3.Row1.Cell4);
} else if (RadioButtonList.btn1.selectedIndex == 0 || RadioButtonList.btn3.selectedIndex == 0) {
if (DropDownList1.rawValue === "Concierge") {
    this.rawValue = ((Table3.Row1.Cell3 * NumericField1) * 0.06);
    }
if (DropDownList1.rawValue != "Concierge" && DropDownList1.rawValue != "" ) {
    this.rawValue = ((Table3.Row1.Cell3 * NumericField1) * 0.04) / Table3.Row1.Cell4;
    }
} else {this.rawValue = 0;}

如果问题仍然存在,我建议您执行以下操作:选择"单选按钮列表",然后在"对象"选项板 ->"绑定"选项卡中验证您拥有的每个单选按钮的值。然后重写代码,使其如下所示:

if (RadioButtonList.rawValue == 2 || RadioButtonList.rawValue == 4) {
    this.rawValue = ((Table3.Row1.Cell3 * NumericField1) / Table3.Row1.Cell4);
} 
else if (RadioButtonList.rawValue == 1 || RadioButtonList.rawValue == 3) {
    if (DropDownList1.rawValue === "Concierge") {
        this.rawValue = ((Table3.Row1.Cell3 * NumericField1) * 0.06);
    }
    if (DropDownList1.rawValue != "Concierge" && DropDownList1.rawValue != "" ) {
        this.rawValue = ((Table3.Row1.Cell3 * NumericField1) * 0.04) / Table3.Row1.Cell4;
    }
} 
else {
    this.rawValue = 0;
}

作为每个按钮的值,我选择一个按钮的数字。