Auto-create form templates for new SharePoint site - InfoPath Dev
in

InfoPath Dev

Auto-create form templates for new SharePoint site

Last post 11-21-2006 10:21 AM by pdjohnson. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 11-20-2006 10:06 AM

    Auto-create form templates for new SharePoint site

    Hi, I have a problem I've been struggling with for some time that I'm hoping you can help with. Our company's projects are all standard, and each project always has to fill out the same forms that we have designed in InfoPath. When we launch a new project, it gets its own SharePoint site. What I would like to do is this:

    1) When we create a new project site in InfoPath, automatically create blank templates of the forms so the project managers know to fill them out
    2) When the project manager launches the blank form, it would be great if the form could be auto-populated with the name of their project and other attributes from their specific SharePoint site
    3) When the project manager submits the form it should submit to their project site
    4) I would still like to be able to manage the templates for the forms centrally (i.e. every project will still share the same InfoPath template).

    I've been playing around with this solution: http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=3040&SearchTerms=form,libraries
    and it gets me #1 and #4, but I don't think it can support #2 and #3 without customizing the xml templates in each project site. I would like to avoid this since we have hundreds of projects each year.

    Another thought I had was to have all projects share their SharePoint form libraries and somehow create a filtered view into the central library for each project so it could only see its own forms. But this doesn't give project managers that nice pre-populated checklist of the blank forms they need to complete.

    Any guidance you could provide would be much appreciated.

    Best regards,

    Paul
  • 11-21-2006 12:46 AM In reply to

    Re: Auto-create form templates for new SharePoint site

    Hi Paul,

    You can definitely do #2 and #3. Are you on SharePoint 2003 or SharePoint 2007?

    For SharePoint 2003 ....

    You can use some code in the form that *detects* the publish location (i.e. the subsite URL) of the project - this can be used to correctly submit to the right subsite.

    For auto-population, you can either have them launch from a button that sends some parameters to InfoPath using the import command line parameter or you can use a pre-baked template.xml file that is used at start-up.

    For SharePoint 2007...

    Use a site collection to store one XSN (vs. multiple XSNs for SharePoint 2003). Create a separate template.xml for each subsite that autopopulates the values. For submit, add a value to the template.xml that you read on load to control submit, or default submit to SharePoint. Honestly, I haven't done the "relative submit" trick with ShP 2007 and there might be an easier way to do it with Site Collections or Office Data Connections.

    Good luck! Let us know if you need more specific pointers.
    Patrick Halstead
    Project Manager at Qdabra
  • 11-21-2006 10:21 AM In reply to

    Re: Auto-create form templates for new SharePoint site

    Patrick, thank you for the speedy reply! I do have some clarifications if you don't mind. We are currently using SP 2003 but are in the process of upgrading to 2007, so understanding the differences between the two will help me to decide whether to do this now or wait a bit for 2007 to be ready.

    For submitting to the correct subsite:

    Can you give me some more detail on how I would detect the subsite url from the template.xml? I created a new instance of the form from the subsite (in SP 2003) and looked at the xml and it only referenced the central xsn template.


    For auto-populating fields: It seems like both options for auto-populating fields in the form require creating or editing an xml file by hand (calling the form with merge parameters requires an xml file with the parameters, and a pre-baked template.xml would also require touching that file for each new project we create). Is there any way to do this without any manual intervention? This might be related to the answer to the question above, since if I can somehow get the URL of the subsite from the form, maybe I can use a web service to query data about the subsite from SharePoint?

    Again, thanks so much for your help with this.
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.