Solved

Infopath Repeating Section

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
If your vDisk VHD file gets deleted from the image store accidentally or on purpose, you won't be able to remove the vDisk from the PVS console. There is a known workaround that is solid.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…

932 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

12 Experts available now in Live!

Get 1:1 Help Now