Check out these threads...
http://www.adobeforums.com/cgi-bin/webx?128@@.3bbf07e5http://www.adobeforums.com/cgi-bin/webx/.3bbc29c4/3http://www.adobeforums.com/cgi-bin/webx/.3bc2105c/1The script is more like this...
_PageScheduleBCD.addInstance(1);
xfa.form.recalculate(1);
//Find the current index
var nindex = (xfa.resolveNodes("PageScheduleBCD[*]").length) -1;
//xfa.host.messageBox("the index is: " + nindex);
app.setTimeOut("this.getField('Form1[0].MainBodySubform[0].PageScheduleBCD[" + nindex + "].SalaryInfo[0].Name[0]').setFocus()", 1);
You have to use getField for it to work. Also, with each added instance you have to find the index so that's why I use a variable each time because it changes.
Thanks,
Ken