views:

65

answers:

1

I have 10 form libraries on a Sharepoint 2007 site.

The site is for the use of 20 "Scholars". Any Scholar (or any of a dozen secretary-types who assist them) can go into any form library, cick [New] to get an Infopath Form, select the appropriate Scholar's name from a drop-down list field, fill out the rest of the form and click [Submit]. The form is then saved (with the title of the form being the Scholar name that was selected from the drop-down list).

The owners of this site want to be able to generate a report (at any given time) that lists all 20 Scholars and which of the 10 forms each has completed.

......................Form1...........Form2............Form3.........etc....Form10  
Scholar Ann Adams.....completed.......not complted.....completed............not completed  
Scholar Beth Baker....completed.......completed........not completed........completed  
etc. 

Any ideas on how to automate this?

A: 

For something like this, I would use an ItemUpdated event receiver to write details of who has updated the form to a separate audit list. Then you can simply query the audit list to get the report you need.

To implement this, first create the audit list containing fields for the form name and a user name (as well as anything else that you feel would be useful to log). Then create an Event Receiver derived from SPItemEventReceiver. The receiver will need to only work on forms libraries. Within the event receiver, override the ItemUpdated method to check of the item that has been updated is a form, and if so log the name of the form that was updated and the user who updated it to the audit list.

There is a very similar example to this at http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spitemeventreceiver.aspx, although it uses the ItemAttachmentAdded method rather than ItemUpdated.

Some other tutorials that may be useful to you are here and here.

Rhys Jones