Thursday, April 23, 2009

Use an InfoPath form that submits data to a restricted SharePoint Form Library?

Background info: I have a need to allow all active domain users access to submit a form but only certain members of a department are allowed to review the results.

Interesting dilemma. Not much out there on the web for this specific request – I’ve looked and looked. I didn’t want to have to write (or more realistically have my Dev dept write) a bunch of code to make an area private. I’m not a code writer.

Finding this gem took a while poking around.

Its from OK State EDU IT SharePoint FAQ

The below steps describe how to create a form to be published from Microsoft Office InfoPath to a SharePoint Form Library. You will need InfoPath 2007, SharePoint Designer 2007, and two SharePoint sites on the same or one level apart for this solution.

This entry does not describe how to build a form in InfoPath.

  1. From the parent SharePoint site, create a second site either below or on the same level as the site where you want to store the form data.
  2. Create a Form Library on the parent SharePoint site.
  3. Before the form has been published, in InfoPath, select Tools from the menu bar and then Submit Options.
  4. Select the submit that sets the form to the Document Library from the drop down list box and click Manage.
  5. Click the Modify button on the right hand side of the new window.
  6. Ensure that the Document Library text box is submitting forms to the parent SharePoint site Form Library created in step 2. Enter a file name for the form in the second text box and click Next >.
  7. Click Finish.
  8. Publish the form to the lower SharePoint site document library after you have selected File and then Publish... from the menu bar in InfoPath.
  9. Log into the lower SharePoint site.
  10. Open the Form Library that you created in step 8.
  11. From the Settings drop down box on the Form Library, select Form Library Settings.
  12. Under the Permissions and Management heading, click Permissions for this Form Library.
  13. Click on the New button in the Form Library.
  14. Enter the user(s)/group(s) that can access the form in the Users/Groups box.
  15. Select the Give users permission directly radio button and check the Contribute permission level.
  16. If you want to send a notification to the user(s)/group(s) check the box next to Send welcome e-mail to the new users and fill out the rest of the form. (NOTE: If you have added a large number of users or a group with a high number of people, it is not advisable to send a welcome message as it can overwork the e-mail servers.)
  17. Click OK.
  18. Log out of the lower site and into the parent SharePoint site.
  19. Create a custom permission named Write Overwrite with the following boxes checked...
    1. Add Items
    2. Edit Items
    3. View Items
    4. View Pages
    5. Open
  20. Click Submit.
  21. Open the Form Library on the parent SharePoint site that you set to submit to in step 2.
  22. Click the Settings drop down button and select Form Library Settings.
  23. Open Permissions for this form library under the Permissions and Management section.
  24. Click the New button.
  25. Enter the same user(s)/group(s) that you entered in step 14, except give the permission level that you created in step 19.
  26. Click OK.

The people that you have given rights to should now be able to access the form from the lower SharePoint site but not see the data submitted to the parent site.

The following steps will replace the Form Library web page on the lower SharePoint site so that the person submitting the form does not get redirected to the Form Library.

  1. Open Microsoft Office SharePoint Designer.
  2. Open the lower SharePoint site to edit.
  3. Browse to the folder where the Form Library *.aspx files are.
  4. Rename the AllItems.aspx file to AllItems1.aspx.
  5. Create a new blank aspx page named AllItems.aspx and save it to the same directory as AllItems1.aspx

Edit the new AllItems.aspx file's HTML content that will be displayed

To create a custom permission in SharePoint 2007 (3.0), follow the steps below.

1. On the main page of the SharePoint site click the Site Actions button in the upper right hand corner.

2. From the drop down list select Site Settings

3. On the next page, click Advanced Permissions under the Users and Permissions heading

4. On the next page, select the Settings drop down.

5. From the list, choose Permission Levels.

6. On the next page, click the Add a Permission Level button.

7. Fill out the form on the page with a name for the permission and criteria. (NOTE: Some criteria rely on other check boxes to be selected)

Only the site and all sub-sites will have the permission created.

1 comment:

Stuart said...

Thanks for this. It nearly worked but I find that the users who are submitting still have access to the folder where the forms are stored if they go to it directly.