I use a similar command and it work.xfa.host.setFocus(xfa.resolveNode("CompanyName["+(CompanyName.instanceManager.count-1)+"].CHOOSE_A_FIELD_TO_SET_FOCUS"));I haven't tested this on your form, but it should work. Just one not, your javascript must run on client.