I am trying to understand how to create an instance of a sub form. That I am able to do the problem is that I need to click the approved denied drop down on page 1 that takes information from Reviewer value and put it in page 2 text area that is the top right box. The first box is a date that is automatically entered when it is initiated. If the engineering approved denied is click then I want to initiate the sub form and enter another set of items. The problem I am having is figuring out how to get the instance array of data to enter each data from the list on the form. If any one can help with code snips would be great this is what I have and what I want is to assign the [*] to be the next instance value because not every approved/denied will occur.
if($.boundItem(xfa.event.newText) == "Denied") {
this.resolveNode('Page2._reviewDept').addInstance(1);
if (xfa.host.version < 8) {
xfa.form.recalculate(1);
}
this.resolveNodes("form1.Page2.reviewDept[*].dept").rawValue = "Comm. Bld/Fire/Mech/Cab Departments";
this.resolveNodes("form1.Page2.reviewDept[*].enterdDate").rawValue = month+"/"+day+"/"+year+" "+hours+":"+minutes;
this.resolveNodes("form1.Page2.reviewDept[*].planReviewer").rawValue = this.resolveNode("comBldReviewer").rawValue;
form1.Page1.Table1.Row3.comBldDateApp.rawValue=month+"/"+day+"/"+year+" "+hours+":"+minutes;
xfa.host.currentPage =1;
}
else if($.boundItem(xfa.event.newText) == "Approved"){
form1.Page1.Table1.Row3.comBldDateApp.rawValue=month+"/"+day+"/"+year+" "+hours+":"+minutes;
this.resolveNode("form1.Page2.reviewDept[*].deptComments").rawValue = "No Comments.";