I have a table wrapped in a subform that can be hidden by unchecking a check box. Each of the table cells have a textfield added with no caption and have the Rich Text option turned on. I want the end user to be able to add text into these table textfields, hide the table, and save the form without losing the text they added to the table textfields. Currently hiding the table clears everything that was added. This is the script that the actions I added created.
//+ GENERATED - DO NOT EDIT (ID:A1B267A9-DA1B-4024-9C78-A7F93B3AE7D6 CRC:3540598859)
//+ Type: Action
//+ Result1: RemoveInstance("$Node2","currentindex","")
//+ Node2: FRM-ENG-06Rev[0].Subform2_MiddleSection[0].GDT-Listbox[0]
//+ Node1: FRM-ENG-06Rev[0].Subform2_MiddleSection[0].Checkbox[0].CheckBox3[0]
//+ Condition1: CheckBox("$Node1","unchecked")
//+ ActionName: CheckBox3.change
if
(this.rawValue == "0") {
this.resolveNode('Subform2_MiddleSection._GDT-Listbox').removeInstance(this.parent.index);
if (xfa.host.version < 8) {
xfa.form.recalculate(1);
}
}
//-
//+ GENERATED - DO NOT EDIT (ID:9174C15E-EB9E-4ABA-AF9A-937900C5C071 CRC:3118237327)
//+ Type: Action
//+ Result1: AddInstance("$Node2")
//+ Or: 1
//+ Node2: FRM-ENG-06Rev[0].Subform2_MiddleSection[0].GDT-Listbox[0]
//+ Node1: FRM-ENG-06Rev[0].Subform2_MiddleSection[0].Checkbox[0].CheckBox3[0]
//+ Condition1: CheckBox("$Node1","checked")
//+ ActionName: CheckBox3.change
if
(this.rawValue == "1") {
this.resolveNode('Subform2_MiddleSection._GDT-Listbox').addInstance(1);
if (xfa.host.version < 8) {
xfa.form.recalculate(1);
}
}
//-
Solved! Go to Solution.
Views
Replies
Total Likes
Views
Replies
Total Likes
Hi,
I would delete that Result and create a new Result in the Action Builder. At the bottom of the list is an option to Show/Hide objects:
That would be better/safer than editting the auto-generated script.
Hope that helps,
Niall
Views
Replies
Total Likes
Okay - I see what you mean. I will try that.
Thanks,
-Don
Views
Replies
Total Likes
hi Don,
The action your originally selected was for add/remove instance. This was deleting the original row, not hiding it.
Good luck,
Niall
Views
Replies
Total Likes
That worked. Thank you so much for your help with this!
-Don
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies