I've encountered a challenge with my code. I'm looking to implement a functionality where clicking a button will add a new row (FailureInstance) in a table (failuretable) and fill three cells with data from other fields. The current code snippet below is not yielding the desired outcome:
xfa.host.messageBox("Failure Recorded and Added To Table Below. Please Continue Filling Out the Form Until All Failures Have Been Recorded. Then Please Save and Submit the Form.", "Continue/Save/Submit", 3);
if (xfa.host.version < 8) {
xfa.form.recalculate(1);
}
var newRow = failuretable._FailureInstance.addInstance(1);
newRow.FailureCode.rawValue = form1.FailureType.rawValue;
newRow.Location.rawValue = form1.CellLocation.rawValue;
newRow.Comments.rawValue = form1.AdditionalComments.rawValue;
Seeking assistance as this implementation does not create a new row in my table. Any guidance would be greatly appreciated!