Sunday, April 29, 2012 2:38 AM
I need to enhance one existing info path form that is already running in production since last 6 months. I suppose around 10,000 records has been created in form library. Now we are planning to do are major changes in form. We need to add/delete fields, make few fields mandatory and add one detail section. Right now this form is published as content type in production. I have copy of this form.
As per the requirement in new form existing records should be open as it use to be. I have done the changes in dev environment. Now could anyone please suggest me how i can push the new form?. I suppose if i will republish the new form, existing record might not be open as now form has been changed and i suppose form xml has also been changed as part of new changes. Can anyone please suggest me how to handle this situation?
Thanks in Adv.
Sunday, April 29, 2012 6:01 AM
You are right. InfoPath form template consists of XML Schema, Views, definition, etc. If the template schema does not match to data schema stored in XML file, then it’s going to threw exception. Deleting fields might cause this issue as you metioned on your post.
You cannot have multiple versions of same InfoPath Form template simultaneously. New form version will always overwrite the existing (old) version. As a workaround, you can publish the latest form as a new content type instead of overwriting previous content type. Change current Form Library Name to something like Archive, and create a new Form Library with same name.
- Edited by Sangha Baek MVPMVP Sunday, April 29, 2012 6:02 AM
Sunday, April 29, 2012 7:38 AM
Thanks for the reply. It seems to me that the solution that you have purposed is not maintainable in long term. We do expect change request for customer frequently. So it wouldn’t be possible to create the new library/ content type each time.
Sunday, April 29, 2012 9:53 AM
SharePoint does not support multiple versions of same form template at the same time. It will keep overwriting previous version. Different versions cannot be used at the same time. Another option would be storing data in different format which means converting XML files to PDF or storing form data in database. Customer still can access PDF or SQL to retrieve archived data.
Anyway, here is something you may still try.
- Adding extra fields are fine. It is not going to affect existing XML files. When you need to remove fields, just remove the controls only from form canvas. Do not remove field node from data source.
- Create a hidden field where you can store version number (or start date) and set up conditional validation for required fields. For example, if version number is equal to 2 and this field is empty, then show validation message. Or if Today() is greater than hidden field and this field is empty, then show validation message.
Hope it helps