The DOMs available in the Impact Management Services scripting differ from those provided to event handlers in Interactive Reporting Studio scripting:
All collection indices start at zero, rather than one
The node names and properties match those stored in the underlying document, as displayed in the repository; there are fewer user-friendly names
The event handlers for sections and shapes cannot be called to effect changes to the document
For example, display the SQL associated with all request line items in all queries by using this code:
var pattern = “//BQY/Qry.MyQry/QryCol.MyQryCol”; var nodes = dom.findNodesByPattern(pattern); for (var i = 0; i < nodes.length; i++) env.log(nodes[i].SQL);
Note: | Both loop indices start at zero and access to the name of the section is through AnnotName, rather than Name. |