I have recently been testing an upgrade to an existing site and came across a phenomenon that had me completely stumped. To give you an idea of what I was dealing with, the existing system has:
- An InfoPath form
- 2 Promoted fields linked to existing columns in the Forms Library
- A Nintex workflow to change the value of the above promoted fields in the Forms Library
We made a change to the form and gave it a new version – Version 2. The Updated system would now have:
- 2 InfoPath content types installed (Version 1 and Version 2)
- Version 2 promotes two different fields to the same columns in the Forms Library as Version 1 mentioned above.
- The same Nintex workflow runs against Version 1 and Version 2 of the form.
Having 2 InfoPath forms installed meant that I had to make sure that I still had data integrity whether using Version 1 or Version 2 of the InfoPath form. This is where the problem came in...
PROBLEM:
As I mentioned earlier, the Nintex workflow would be updating the Form Library columns where the InfoPath fields were promoted to. But as I ran through the system I realised that, while the workflow was still updating the promoted fields for the Version 1 form, it wasn't doing the same for Version 2 forms.
I tried everything from logging extra notes in the workflow history to make sure the workflow actually tries to update Version 2 to changing the fields that the workflow was updating, you name it! Well, it finally came to me. One connection lead to another connection and BOOM – LIGHT BULB!
SOLUTION:
When you publish an InfoPath form and you have a promoted field, by default a user cannot edit that field directly in the Form Library. It is a read-only column. But, if you modify the Column you want to promote, you will see a tick box option available to you:
"Allow users to edit data in this field by using a datasheet or properties page"
When you select this option, you make the field value editable in the Form Library. For a detailed explanation of how to set this option, see David Gerhardt's blog:
Promoting Editable SharePoint Columns.
My problem was that, where the InfoPath form Version 1 promoted fields had this option ticked when it was published, the new fields being promoted in Version 2 did not, and that caused the conflict.