views:

533

answers:

3

Hi, I need to design an InfoPath form that submits to different SharePoint libraries. Basically there needs to be a drop down list where a user selects a specific department. The department that is selected would then specify which SharePoint library the InfoPath Form gets submitted to and who gets notified to approve the request form. After the form is approved, the form needs to transfer to another SharePoint Library for processing by our Payroll dept. Can someone point me in the right direction to achieve this. Thanks in advance

A: 

One way of handling this would be to wrap the XmlFormView webpart in a custom webpart and respond to the SubmitToHost event. To do this you need to set the Submit option in InfoPath to "Hosting environment". This way you could save the form to any library based on code and other form data.

For some tips on wrapping the XmlFormView see "How We Did It – Automating Service Requests using InfoPath Forms Services"

As for which library to choose, you could have a secondary data source(s) on the form that pointed to a SharePoint List for the Departments and URL of the library to which the form would be submitted. Your code could then obtain the list to submit to from the form data.

As for the approval routing to a new library, this sounds liek a custom workflow or an SPItemEvent handler. For the second case, you could respond to the ItemUpdated event and create a copy of the form in a new form library. Not sure if you could do this with a SPD 2007 workflow.

Hope this helps a bit.

Pete Skelly
A: 

have one documet lidry containing the form. upload to the libaryand have an event or workflow move the form when it's saved,

or

have one documet lidry containing the form and have diffrent vuiews filtering on it.

Chris Jones
A: 

Not sure if you are still looking for a solution to this one, but wont mind adding my two cents. I think you can accomplish this in InfoPath using Rules in Submit Options. First define multiple Data Connections, one for each library. Next setup the rules using conditions/actions pair. Like if value in combo box is x then submit using Submit Data Connection1, ...

As for sending out the notifications, you can attach workflows to each of the document libraries. Hope it helps.

Abdul