I have a form that have several buttons. It has buttons to add and remove a record. It also has a reset button which clears all information in each record created. My form starts off with one blank record and I can add as many records as needed. The problem is that if I create 30 records, I will need to click the "remove record" button 29 times in order for the form to get back to where it started off. Is there a way to remove all records created at once so that I can start off with one record after I reset the records? This form was created in livecycle.
Solved! Go to Solution.
Views
Replies
Total Likes
try
if(xfa.host.messageBox("Are you sure you want to erase all records and entries?", "Reset the form", 2,2) == 4){
xfa.host.messageBox("All entries have been removed");
xfa.resolveNode("form1.obtainedsubform.cardssubform.CARDS._Table1").setInstances(1);
xfa.host.resetData();
}
else {
xfa.host.messageBox("No entries have been removed");
}
Views
Replies
Total Likes
I found a thread and entered this script, however, when I click no, it still resets the form.
if(xfa.host.messageBox("Are you sure you want to erase all records and entries?", "Reset the form", 2,2) == 4){
xfa.host.messageBox("All entries have been removed");
}
else{
xfa.host.messageBox("No entries have been removed");
}
Views
Replies
Total Likes
That code looks ok to me, where in that have you put your actual reset code, maybe if you could cut-and-paste the whole click event code from your form.
Views
Replies
Total Likes
form1.#pageSet[0].Page1.HEADER.ResetButton1::click - (JavaScript, client)
xfa.resolveNode("form1.obtainedsubform.cardssubform.CARDS._Table1").setInstances(1);
xfa.host.resetData();
if(xfa.host.messageBox("Are you sure you want to erase all records and entries?", "Reset the form", 2,2) == 4){
xfa.host.messageBox("All entries have been removed");
}
else{
xfa.host.messageBox("No entries have been removed");
}
Views
Replies
Total Likes
try
if(xfa.host.messageBox("Are you sure you want to erase all records and entries?", "Reset the form", 2,2) == 4){
xfa.host.messageBox("All entries have been removed");
xfa.resolveNode("form1.obtainedsubform.cardssubform.CARDS._Table1").setInstances(1);
xfa.host.resetData();
}
else {
xfa.host.messageBox("No entries have been removed");
}
Views
Replies
Total Likes
That works!! Thank you so much for your patience and helping me.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies