Search code examples
xpathinfopath

InfoPath Ignores Controls in Rules and XPath Randomly


Overview

I have several Check Box controls across several views. These checkboxes serve as toggles to hide/unhide various sections within the same view.

The relevant rule is set to the section, with a Condition of chkbx1 != "True", and format set to Hide this control. It works fine.

Additionally, at the base of the view, I have a textbox with a default value leveraging an XPath formula.

The XPath is used to create a message based on whether certain boxes were checked. Example below, and it also works fine.

 substring("Box was checked.", 1, (../@chkbx1 = "True")*16)

Problem

However, over the course of developing this series of views, I will periodically go back and re-test. During these tests, I noticed that seemingly randomly, some of these boxes stop triggering their rules. They stop triggering the XPath.

When I go into the field list for XPath, they are still showing. But it's like IP loses track of them, and just ignores them.

This happened previously during this project, and the only solution I found was to completely remove the checkbox, and re-create it.

However, in addition to be tedious, I am nervous about not knowing the cause, nor the frequency.

Does anyone have any experience with this sort of oddity?

I am using InfoPath 2010, with a database connection to Access 2010.


Solution

  • You need to check the checkboxes's default values and rules. There may be broken ones among them.