Friday, April 20, 2007

Changing PI on an Infopath Form using repair.aspx

So there is this utility inside Sharepoint 2003. If you ever copy your forms from one library location to another library location, they will copy, but the PI (Processing Instructions) inside the Infopath forms will still be pointing to the original location where the template.xsn was located.

So all of your newly copy Infopath forms when opened they will go to the original location for the template. For instance if your original location is:

and you copy this to a new location, say:

the Infopath forms in the 2006 library will contain the PI
   15 <?mso-infoPathSolution  PIVersion='' href='http://yourSTS_site/Books_2005/Forms/template.xsn'?>
   16 <?mso-application  progid='InfoPath.Document'?>
   17 <?mso-infoPath-file-attachment-present?>

and what you really want is the PI to say something like this:

   15 <?mso-infoPathSolution  PIVersion='' href='http://yourSTS_site/Books_2006/Forms/template.xsn'?>
   16 <?mso-application  progid='InfoPath.Document'?>
   17 <?mso-infoPath-file-attachment-present?>

Enter the repair.aspx utility.! If you type the following:

then you will get a page that will display all of your forms that have the wrong PI embedded into them and then you can select which ones to update.

Click on the Relink Forms command and they will be automatically updated to use the current form library template.


No comments: