Hello,
I've been struggling with this issue for several days. I've read just about every piece of information I can find on google- document object models, xfa/xdp specifications, video tutorials, etc. I'm not exactly a beginner programmer, either. I'm trying to create a data connection to an Access database. I have set up the connection successfully under the Data View tab as "SpecsIn". However, when I try to access the sourceSet children, I get an index out of bounds error. I've tested it a few different ways and always the list comes back as length 0.
This results in an index out of bounds exception.
var nIndex = 0;
while(xfa.sourceSet.nodes.item(nIndex).name != "SpecsIn"){nIndex++;}
This results in a length of 0:
var oSources = xfa.sourceSet.nodes;
console.println(oSources.length.toString());
If I try to refer to the connection directly, ie. xfa.sourceSet.SpecsIn.command.query.setAttribute("text", "commandType");
I get this error: Invalid property get operation; packet doesn't have property 'SpecsIn'
The database connection seems to be sound, since when I set the connection delay to off, the bound field populates automatically and correctly. The XML source also seems to be formed well. How can I do anything with my data connection if JavaScript can't even find the node?!
Please help, this is very frustrating. I feel like I must be missing something fairly obvious?