try { // Move the first subform to be last var vSF = xfa.template.nodes.append(xfa.template["#subform"]); } catch (e) { designer.println("error at line: " + e.line + ": " + e.toString()); for (var p in e) { designer.println(p); } }