Adobe 如何在LiveCycle Designer中删除2个实例

Adobe 如何在LiveCycle Designer中删除2个实例,adobe,livecycle,livecycle-designer,Adobe,Livecycle,Livecycle Designer,我有两张桌子。表1和表2。 表1有“添加行”按钮。在两个表中单击时都添加了行。 表的行数相同。 第一个表中的每一行都有一个删除当前行的按钮。 此按钮必须删除第二个表中的相应行 form1.Page.Table1.Data_row_table1.Delete::click - (FormCalc, client) var row_index = $.parent.index Table2._Data_row_table2.removeInstance(row_index) Table1._Data

我有两张桌子。表1和表2。 表1有“添加行”按钮。在两个表中单击时都添加了行。 表的行数相同。 第一个表中的每一行都有一个删除当前行的按钮。 此按钮必须删除第二个表中的相应行

form1.Page.Table1.Data_row_table1.Delete::click - (FormCalc, client)
var row_index = $.parent.index
Table2._Data_row_table2.removeInstance(row_index)
Table1._Data_row_table1.removeInstance(row_index)
脚本:

//+ GENERATED - DO NOT EDIT (ID:DBE5BAB4-5E5A-461D-A88D-88E626F6B072 CRC:3827021343)
//+ Type: Action
//+ Result2: RemoveInstance("$Node3","currentindex","")
//+ Result1: RemoveInstance("$Node2","currentindex","")
//+ Node3: form1[0].Page[0].Table2[0].Data_row_table2[0]
//+ Node2: form1[0].Page[0].Table1[0].Data_row_table1[0]
//+ Node1: form1[0].Page[0].Table1[0].Data_row_table1[0].Delete[0]
//+ Condition1: Button("$Node1","click")
//+ ActionName: Delete.click
this.resolveNode('Table1._Data_row_table1').removeInstance(this.parent.index);
if (xfa.host.version < 8) {
    xfa.form.recalculate(1);
}
this.resolveNode('Table2._Data_row_table2').removeInstance(this.parent.index);
if (xfa.host.version < 8) {
    xfa.form.recalculate(1);
}
//-
/+生成-不编辑(ID:DBE5BAB4-5E5A-461D-A88D-88E626B072 CRC:3827021343)
//+类型:行动
//+结果2:RemoveInstance(“$Node3”、“currentindex”和“)
//+结果1:RemoveInstance(“$Node2”,“currentindex”,“当前索引”)
//+节点3:表单1[0]。页面[0]。表2[0]。数据\u行\u表2[0]
//+节点2:表单1[0]。页面[0]。表1[0]。数据\u行\u表1[0]
//+节点1:表单1[0]。页面[0]。表1[0]。数据行\表1[0]。删除[0]
//+条件1:按钮(“$Node1”,“单击”)
//+ActionName:删除。单击
this.resolveNode('Table1.\u Data\u row\u Table1').removeInstance(this.parent.index);
if(xfa.host.version<8){
xfa.表单.重新计算(1);
}
this.resolveNode('Table2.\u Data\u row\u Table2').removeInstance(this.parent.index);
if(xfa.host.version<8){
xfa.表单.重新计算(1);
}
//-

如何删除这两个实例?

我找到了解决方案

必须首先从第二个表中删除一行

form1.Page.Table1.Data_row_table1.Delete::click - (FormCalc, client)
var row_index = $.parent.index
Table2._Data_row_table2.removeInstance(row_index)
Table1._Data_row_table1.removeInstance(row_index)

您不需要先从第二个表中删除。在删除之前,只需将索引存储在变量中。