I was asked to figure out how to allow many users to fill-out and edit a form based on InfoPath, however the users may not access or see anyone else's form and the template must be easy to manage as it is revised over time. On the surface, the answer seemed simple - you just upload the template into a SharePoint 2007 Form Library and you're set. Now you have this issue of securing the documents so Group A users can only see and edit Group A forms and Group B users can only see and edit Group B forms. Ok that is addressed by row-level security and you just assign the right group to each form. Then it was determined that each set of users would access their own site and this form is common between users to collect information. With the potential to have hundreds of sites, it doesn't make much sense any more to publish the InfoPath form to each Form Library and then try to keep track of managing the revisions to the forms over time. No problem...lets publish this form as a Content Type, that seems to have the same limitations as publishing the form to a Form Library. Although it does address using more advanced features of InfoPath 2007 that are not browser-enabled, but this is not going to solve my problem either. Then I remembered hearing that you upload a Form Template in Central Administration and assign it to an entire Site Collection. This allows you to manage the form in one place and use it in many places, this fits the requirements perfectly. After some quick searching I found that the information on this seemed almost non-existent, so here is how you setup the template in InfoPath 2007 and SharePoint 2007. I ran into a minor glitch when I went back to update the template later on and there was something about a job timer not running and SharePoint listed how to solve the problem using StsAdm.exe, I might have overlooked configuring a setting at some point but my problem was solved so I was happy.
- Configure InfoPath so your form is Browser-Enabled and create your template. Pay careful attention to which features are compatible with a browser-enabled form, some of the more advanced features are only available in the InfoPath 2007 client. Using the Design Checker will alert you to most of the problems you may encounter.
- Now lets Publish your Template and make it an Administrator Approved Template for SharePoint 2007. You'll need to select the location you'd like to publish your form, which in this case will be a SharePoint server with or without InfoPath Form Services.
- Select the location of the SharePoint or InfoPath Form Services site you'd like to publish to.
- Check the box that says, Enable this form to be filled out by using a browser and then select the radio-button for Administrator-approved form template (advanced). This prepares the form for an Administrator to upload the form in SharePoint so it can be assigned as a Content Type to a Site Collection.
- Specify a location and filename for the form template to be saved at. This can be a file share or a SharePoint Library, the Administrator has to be able to access the file to upload the template into SharePoint.
- You can add any columns names from the template that you'd like to be available to SharePoint to display in a view or to facilitate search for those fields. I chose not to use any for this scenario.
- Verify your form information and then click Publish.
- You'll see another screen that will say your form template was published successfully and it will have a note about providing your server administrator with the info provided above. Click Close.
Now onto the fun part of making this template a Content Type in SharePoint so you can use it in multiple libraries and manage the template in one location. You must have Admin rights to SharePoint Central Administration to perform this task.
- Navigate to the Central Administration home page and go to Application Management, you'll see InfoPath Form Services listed on the bottom left-hand side. Click on Upload Form Template.you'll see a screen like below. Find the location of the template and browse to it. (If you saved it to SharePoint you'll need to save a local copy on your computer and upload from there.)
- Once you upload the form template you'll get a message telling you it was successfully uploaded. Click OK.
- You're now taken to a screen to Manage Form Templates, you need to Activate to a Site Collection. Click on that link and select the correct Web Application and the Site Collection under that Web Application where you want the Content Type activated for your Template. Now your template will be available as a Content Type for all of your Libraries under your Site Collection.
- When you make revisions to your Form Template and need to re-publish follow all of the steps above. You won't need to activate the Template again as it has already been activated. You will probably get the same message I saw about about the Timer Job Service, see the message below and perform the following action on the server to upgrade the template. I'll have to figure out how to enable the administrative service later.
"The timer job for the operation has been created. However, it cannot be run because the administrative service for this server is not enabled. To run the timer job, use the StsAdm.exe command line utility (stsadm.exe -o execadmsvcjobs)."
So run the StsAdm.exe utility on the Server running SharePoint, the process will take a few minutes to complete and then your updated template will be ready for use. The command to run is "stsadm.exe -o execadmsvcjobs", this has to be run from the directory where StsAdm.exe lives. So you'll just have to navigate to that directory in Command Prompt to run it.
Now onto setting up your Form Library or Document Library to use the Template that is now a Content Type.
- Create a new Form Library or a Document Library under your Site Collection or any of the Sites under that Site Collection. Then go into the Library and go to Settings, Form Library Settings (or Document Library Settings). Under General Settings, click on Advanced Settings and select Yes under Allow Management of Content Types then click OK.
- Find the Content Types section under Settings. Click on Add from existing site content types and select the name of the template you uploaded earlier. Set that as your default Content Type and make sure it's Visible on the New Button. You can also delete the default content type to clean up the library. Adjust your views as needed and set your permissions on the Library and your users can start filling out forms and submitting them to the library. Repeat these steps for every library you wish to use the Template in and assign user permissions as needed.