0
votes

Using InfoPath 2010 which publishes to a SharePoint 2010 Form Library, a rule I added to the "Form Load" area doesn't seem to be running. Here's my scenario:

  1. On form load, I added a rule to check if a SharePoint field (from the SharePoint list my form is published to) is set to a string, say "enable". The rule sets a flag in infopath (boolean field) to "true".

  2. On form submit, I added a rule to set the flag to "false".

  3. The fields on the form each have rules to "disable this control" when the flag is "false", i.e. after the form is initially submitted.

  4. Testing this, I submit the form to SharePoint, open it up and sure enough the fields are disabled. All good there.

  5. I manually change in the SharePoint item the string field to say "enable", so I would expect my rule to run and the flag updated. I open up the form again.

The fields are still disabled! The flag is still set to "false"!

Why doesn't this work? Either the rule is never run or the condition is failing somehow.

1
As for the debugging question, I was able to do it by dragging the data connection's field into the form itself to see what the output is from my SP list. It shows the status being changed when I do it manually, but the flag is not being set. Somehow the rule is not being met or not running.starmandeluxe

1 Answers

1
votes

I was able to fix it by doing the following:

  1. Ensure that "Include data for the active form only" was checked (I had to separate this field into another data connection because that box could not be checked for another field I was using), and

  2. Ensure that in the rule I was selecting from the "dataFields" folder under the data connection instead of "queryFields"

With these two things the form now behaves like it should.