Solved

Infopath Repeating Section

Posted on 2009-04-06
1
884 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

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…
We have come a long way with backup and data protection — from backing up to floppies, external drives, CDs, Blu-ray, flash drives, SSD drives, and now to the cloud.
This video discusses moving either the default database or any database to a new volume.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now