Summary

When publishing an InfoPath Form Template (XSN file) to multiple servers (i.e. a development server and a production server) and you are promoting fields from the InfoPath data source to be created as columns in SharePoint, those fields may get recreated each time you publish the XSN.

More Information

When publishing as a Site Content Type and you promote fields during the publishing process, the first time you publish the XSN those fields will typically need to be created as site columns. You can see this in the publishing wizard - when you click Modify on any fields you have promoted, you will see the default option for the SharePoint “Site column group” is: "None: Create new site column."

InfoPath Select a Field Dialog

If you subsequently modify the XSN and publish it back to the same server/site the promoted fields will retain their mapping to the SharePoint column that was previously created. Again, you can see this in the Publishing Wizard by clicking Modify on the promoted field and now the default option for the SharePoint "Site column group" is: "(This content type.)"

However, where you can run into an issue with the promoted fields getting created multiple times is when you first publish to one server (i.e. your development server), then publish the same Form Template to a different server (i.e. your production server) and then publish back again to your development server. In this scenario even though all the fields still show in the promoted fields list in the Publishing Wizard, because you are publishing to a different server than the last time, the fields are no longer mapped to the SharePoint columns and are once again, set to the default option: "None: Create new site column." If you now complete the Publishing Wizard, those site columns are recreated.

This behavior is by design – when you change the server you are currently publishing to from that which you specified in your last publish process, InfoPath does not re-map those promoted fields to the SharePoint columns.

Resolution

To insure the promoted fields are not recreated each time you publish, use one of the following options:

  1. Each time you publish the XSN, select the fields on the promoted field’s screen of the Publishing Wizard, click Modify and insure those fields are mapped correctly.
  2. Use separate InfoPath Form Templates for the different servers. What this means is you will maintain separate copies of the InfoPath Form Template (one for the development server and one for the production server) and after making a change to the Form Template that is published to your development server you would make the same change to the Form Template for your production server. This insures the Form Templates are always published to the same URL.