I have a data connection in my form and I need to loop through the data within the node items. On the form ready event I have:
var a = xfa.resolveNode("$record.message.node[*]...").value
The loop should replace the * with a number starting at 0 and run till done. It does not work. I have tried to modify this with resolveNodes and other attempts.
I was able to cheat a bit and create a dynamic table and load the data into the table first, then use the loop to go through the data within the fields. It works but this is an extra step, that I should be able to avoid.
Any help would be greatly appreciated.
the script I would like to use is below. Something is not working in setting the variable directly to the data node.
var vDescItems = xfa.resolveNode("$record.message.controlActProcess.reasonOf[*].detectedIssueEvent.value.code").value
Thank you for the reply. I did attempt to use xfa.resolveNodes. That still returned no value. I ran a test by setting similar to below:
var vDescItems = xfa.resolveNode("$record.message.controlActProcess.reasonOf.detectedIssueEvent.code.code").value
TextField1.rawValue = vDescItems
the test yielded the correct node data. However when I used a loop to provide data in that node, I received no returned value. the only way I was able to accomplish this was to populate a table with the data and then loop through the table to get the results. It works but it is not as clean as I would like to see.
Also I did try to use the .value property in the loop and that did not work either.