Infopath Repeating Section
Posted on 2009-04-06
I am working on a Infopath form with a repeating section that has four fields.
I have it set so that "txtOnHand" is calulated by txtRecieved - txtSend. So if we Recived 10 boxes and sent 8 boxes, we should have 2 boxes on hand. txtPreviousOnHand has an Function value of "number(preceding-sibling::my:txtOnHand)", so the next repeating row would start with a txtPrevioiusOnHand of 2.
The problem comes into play when we create an additional row in the repeating section. The txtPreviousOnHand field is suppose to pull the txtOnHand value from the PREVIOUS row, and it does work about 75% of the time. FOr some reason the other 25% of the time, I get a "NaN" error. This error seems to be random. It can happen on the second repeating row or the seventh.
Any help would be GREAT!