Pergunta

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.

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top