With the recent release of the 30 or so (have to be careful as the number seems to change everytime you look at it) WSS site templates that Microsoft has provided us, some people are scratching their heads wondering why these OOTB solutions are not so out-of-the-box. Read on to find out why and how to correct these problems.
For the most part, the sites work fine. Install the template, create a site and you're off to the races. For some however there are parts of the sites that will challenge you for a credentials and others that ask for locations of Web Services. This is part and parcel in the way that InfoPath forms are stored and work with Windows SharePoint Services.
With InfoPath forms stored in a WSS site you can (with Service Pack 1 installed) consume the Web Services that WSS offers and use this to populate drop down lists, lookup tables, etc. in your InfoPath form. This is great for something like a request form where you want the lookups to be dynamic and controlled. It does however present a problem when you try to move the forms to another server like how the templates were offered up recently for download.
We'll walk through fixing the Travel Request site as it's one of those ones that needs some extra care before you can start using it. You can use the principles here for any of the other templates.
The original forms for the site were created on a specific server by the folks at Quilogy so when you click on the Submit a New Travel Request from the home page you'll see this:
Why is the InfoPath form trying to connect to this Web Service? Simple. There are lists embedded in the form that are being loaded from it and need information from the site. Of course you don't have credentials for their site plus you'll want your forms to be reading from your own site. So here's how to fix this.
First click Cancel on the dialog above and quit InfoPath. Now return back to the site and select Travel Request Form from the side navigation bar. This is the form library that holds the form you fill out when you launch it. Select Modify settings and columns for this form library under the Actions pane. Now click on Edit Template under the General Settings. This will launch InfoPath so we can change our form to point to our own site.
Choose Tools then Data Connections from the main menu. You'll see the connections that this InfoPath form has back to the SharePoint site.
So we see Departments, Employees, currencies, and Main submit. The first three are lookups and Main submit is for sending the form back to SharePoint (the Submit to SharePoint button on the form). Select Departments and click Modify. This brings up the dialog to change the settings for this connection:
The first page is the URL to your SharePoint site. This is the main thing to fix because we want to point it to our own site. Enter the URL to the site here and click Next.
You'll notice that it took a second for the next step to come up. This is because the Wizard actually goes to your site and pulls back the lists and libraries that are available. If you have added one, it will appear here. Now select Departments and click Next.
Now you need to select the fields that will be available in the form. This is usually just the name but you may need to play around depending on the form you have. Also from the Data Connection screen above it tells you some details about the connection (like if it loads each time the form loads or not). Use this information to help you decide how you want things configured. For now, click Department_Name and click Next.
The name will normally be filled in for you and you can choose to have it retrieve the information automatically. Click Finish and we're done with this Data Connection.
When you've added one, you might want to check it. Click on File | Preview | Default (or Ctrl+Shift+B, yes, just like Visual Studio). This will launch the form and connect to the SharePoint site to fill in any initial values. If there are any errors you'll see them or if the form challenges you then there's something that's loading from outside of your site. Continue to fix the fields until you have a form you can preview. The dropdowns should now work as expected and retrieve their values from your SharePoint site.
The last piece to modify is the submit part. This is the Main submit Data Connection and is currently hooked up to http://wsstemplates.quilogy.net/… so we want to change this. This one requires you to change the URL to the fully qualified path to the form library itself. So selected "http://wsstemplates.quilogy.net/TravelRequest_Basic/" and replace that with your own URL (keeping the "Travel Agent Request Form" intact) and click Next then Finish.
Now click Save and close InfoPath. Return to your site and launch the form (by clicking on Fill out this form in the form library or from the main page). The form should launch correctly and you can fill it out and click on "Submit to SharePoint" where it will save the new form back to the site and you can view it there.
That's it. Takes about 5 or 10 minutes to clean up the template but now you're ready to use it in your own environment. Hope that helps!