I am attempting to add fields for a subtotal, which has been working on other parts of the form. I have added a new repeating table in, and the xpath function for counting number of nodes works fine if i use it in a formula box on a rules tab attached to something random on the page, but when I try to use the same thing in my js code, it shows 0 ...