How To Deploy A Form To Multiple SharePoint Libraries - Jo-Anne Alfafara
in

InfoPath Dev

Jo-Anne Alfafara

How To Deploy A Form To Multiple SharePoint Libraries

There are times when you want to deploy a template to multiple SharePoint form libraries. For example, multiple teams may use the same template but need to keep their documents separate. The typical way to do this is to deploy the form twice, once for each library. However, a few problems arise when you do this:

  • If a user tries to open a form from the other library, they will get the form conflict dialog even though the form is supposed to be the same.
  • A user who has cached a form from one library cannot view forms from the other library offline. InfoPath thinks they're different.
  • To deploy form updates you have to republish to each library separately.
    There is a little known feature whereby you can publish the XSN template to one location and then reference it in multiple SharePoint form libraries. The steps to do this are as follows.

DEPLOY A TEMPLATE.XML FILE

1. Deploy the XSN to your shared location. It can be on the same SharePoint server in a document library (using the deploy to file share publish wizard option) or any file share or web site.
2. Launch the form from that location and immediately save a blank form instance and call it "template.xml"



3. Next, browse to the first form library where you want to publish the template. In the top right View dropdown, click Explorer View. In SharePoint 2003, you can find this link displayed in the left column.

4. You will see a Forms folder. Double-click that to go there.

NOTE: Make sure Show hidden files and folders option is selected in your Folder Options. Otherwise, the folder will not be displayed.

5. Once Forms folder is opened, you will see a file called template.xsn.

6. Right-click the template.xsn and delete it.
7. Copy the template.xml file you created earlier into this folder.

8. Click Form Library Settings in the library toolbar. If you’re using SharePoint 2003, click Modify Settings and Columns in the left column.

9. Under General Settings, click Advanced settings.
10. In the Document Template field, rename the Template URL from template.xsn to template.xml. Note you might think you could point directly to the other XSN from here but you can't because this link can only be a file in this library.

11. Click OK and you're done!
12. Now when you click New button in the SharePoint library toolbar it will launch the form that you deployed in the central location.
13. Repeat for other libraries where you want to use the same template.

DEFAULT CONTENT IN THE TEMPLATE.XML FILE

An advanced use of this can also be to have the template.xml file have some prefilled content that you want users to have when launching a new file. At step 2, fill in the default form data and save that locally. You can make a different copy of the template.xml with different default data for each library (only 1 per library). Then upload that file and when the user clicks in the library to create a new form, that default data will be pre-populated.

Comments

 

Links (9/14/2009) « Steve Pietrek – Everything SharePoint said:

Pingback from  Links (9/14/2009) « Steve Pietrek – Everything SharePoint

September 14, 2009 6:08 PM
 

RoccoNH said:

Hi.

Thank you for reading this SharePoint question… let’s title it “How to get two separate SharePoints in different locations to pass data to one another.”

Situation:

I currently have an InfoPath 03 Form being deployed to one SharePoint document library people use to enter change control requests.  I would consider this to be the “Master Dashboard” where I would go to do maintenance on any/all requests and move this form through an approval process (New, In Process, etc). I use Sharepoint Designer to run a workflow to send out these emails.  It works really well.

I now need to deploy this process to other entities so I needed to create a separate SharePoint library at another entity which is a mirror image of the master.  Easy enough.

Problem:

This secondary library will only house forms from the group “HWN” site. So the HWNs should only be able to see their requests and what its status is based on the Master site’s maintenance. Instead of having to do maintenance in two places, I want the form in the Master Dashboard to update the status in request on the HWN area. How can I accomplish this task? If this is not clear, please drop me an email and I can elaborate.

Any assistance is greatly appreciated.

October 7, 2009 8:26 AM
 

domenicfz said:

How would this work when in each site the form submit options are going to change?

October 19, 2009 10:32 AM
Copyright © 2003-2012 Qdabra Software. All rights reserved.
View our Terms of Use.