[英]Adobe Livecycle Designer Javascript Calculation
My if statement below is not working on a numeric field that is set to calculate in Adobe Livecycle Designer and I can't figure it out. 我下面的if语句不适用于设置为在Adobe Livecycle Designer中进行计算的数字字段,我无法弄清楚。 All of my field names are accurate and those fields are set as numeric. 我所有的字段名称都是正确的,并且这些字段都设置为数字。 It keeps showing a value of 0. 它始终显示值为0。
Any help or guidance is appreciated. 任何帮助或指导表示赞赏。
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 the problem still persists I would suggest you do following: Select RadioButtonList and in the Object palette -> Binding tab verify values for each radio button you have. 如果问题仍然存在,建议您执行以下操作:选择RadioButtonList,然后在“对象”面板->“绑定”选项卡中,验证每个单选按钮的值。 Then rewrite your code to look it similar to this: 然后重写您的代码,使其看起来类似于以下内容:
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;
}
As a value for each button I choose a number of a button. 作为每个按钮的值,我选择一个按钮的数量。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.