Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Infopath Repeating Section

Posted on 2009-04-06
1
895 Views
Last Modified: 2012-05-06
I am working on a Infopath form with a repeating section that has four fields.

txtPreviousOnHand
txtRecived
txtSent
txtOnHand


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!
0
Comment
Question by:tyty4u2
1 Comment
 

Accepted Solution

by:
tyty4u2 earned 0 total points
ID: 24180450
I found the solution by using the following xpath.

../preceding-sibling::my:group2[1]/my:field1
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Before you can digitally sign infopath forms, you must have a digital certificate. Microsoft Certificate Services will need to be enabled on a Windows Server 2008 to facilitate the creation and verification of the digital certifciates on the web ser…
Some of the SEO trends we might expect in 2017.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question