As a quick follow up, here's the code I am currently using which loops through each node and is supposed to make changes accordingly. If there is no way to determine which node an event is occurring on, then I don't mind going the loop route but for some reason this loop is not having the desired effect. This code is hit in the CHANGE event for nodeName1, and I'm getting strange behavior where making a change in one instance of my subform will have an effect in the other instances.
data.Page.DATA.USER_INPUT.RECV_CU_WGT::change - (JavaScript, client)
var nodeCount = data.Page.dataNode.resolveNodes("DATA[*]").length;
for(var i = 0; i < nodeCount; i++){
var nodeName1 = "data.Page.DATA["+ i +"].USER_INPUT.RECV_CU_WGT";
var nodeName2 = "data.Page.DATA["+ i +"].USER_INPUT.RECV_CU_WGT_UOM";
var nodeName3 = "data.Page.DATA["+ i +"].USER_INPUT.RECV_CU_WGT_PER";
var nodeName4 = "data.Page.DATA["+ i +"].USER_INPUT.RECV_CU_WGT_PER_UOM";
if(xfa.resolveNode(nodeName1).rawValue == null){
xfa.resolveNode(nodeName2).mandatory = "error";
xfa.resolveNode(nodeName3).mandatory = "error";
xfa.resolveNode(nodeName4).mandatory = "error";
}
if(xfa.resolveNode(nodeName1).rawValue != null){
xfa.resolveNode(nodeName2).mandatory = "disabled";
xfa.resolveNode(nodeName3).mandatory = "disabled";
xfa.resolveNode(nodeName4).mandatory = "disabled";
}
}