Delphi Technology Solutions - development, websites, computers and networks

Development   |   Computers & Networks   |   Websites   |   Products & Services   |   Client Success   |   News

David's Ramblings on Development

SharePoint, InfoPath, .Net and more




Unused DataSources in InfoPath

Share |
clock August 25, 2008 17:34 by author David Lozzi
So this is quite the interesting issue. Apparently InfoPath HATES data sources that are not being used. If you have a data source that's not assigned to anything, say a dropdown list or something, then the form doesn't like life. For example, I had a data source that was in my IP form which was the lookup for a dropdown but then I replaced it with another lookup list. Now this data source is doing nothing, just hanging out, unassigned and alone. The data source gets moody, frustrated and then doesn't play nice with the other objects in the form.

The error I received is:

Type: XmlException, Exception Message: Unexpected end of file has occurred. The following elements are not closed: dfs:dataFields, dfs:myFields. Line 1, position 328.)

Yeah, that really helps! I ran into this one time before, where a rogue data source was causing issues, but I forget the error I was getting then. If I remember, I'll throw it up here. If you happened by this post and are receiving a different error, let me know so I can share with all!

I hope this helps!
 





Install Free Templates for Microsoft SharePoint

Share |
clock August 20, 2008 17:36 by author David Lozzi
If you haven't been under a rock for the last bunch of years and have heard of SharePoint, then you should know Microsoft has a free download available for Windows SharePoint Services 3 and MOSS. The download includes 40 templates to use in SharePoint. From employee management, to vacation requests to project management, they are there and all free. Click here to download from Microsoft's site.

To install these freebies, there are two different methods you must use. Half of the templates are .stp files, which can be uploaded directly to the Site Templates library in SharePoint (go to Site Actions > Site Settings). The other 20 are .wsp files, which are feature files and need to be installed on the server console directly.

Once you have the .wsp files on the server and you're at the console (or remote desktop), you need to run three commands to install the application base, then two sets of commands per wsp you want to install. This can be a lot of fun since that's 43 commands to enter. I've written a little batch script that will install all of the templates for you, and all you have to do is run it!


@Echo Off
@SET stsadm="c:-program files-common files-microsoft shared-web server extensions-12-bin-stsadm.exe"

Echo Installing ApplicationTemplateCore.wsp
%stsadm% -o addsolution -filename ApplicationTemplateCore.wsp
%stsadm% -o deploysolution -name ApplicationTemplateCore.wsp -allowgacdeployment -immediate
%stsadm% -o copyappbincontent

Echo Installing AbsenceVacationSchedule.wsp
%stsadm% -o addsolution -filename AbsenceVacationSchedule.wsp
%stsadm% -o deploysolution -name AbsenceVacationSchedule.wsp -allowgacdeployment -immediate

Echo Installing BudgetingTrackingMultipleProjects.wsp
%stsadm% -o addsolution -filename BudgetingTrackingMultipleProjects.wsp
%stsadm% -o deploysolution -name BudgetingTrackingMultipleProjects.wsp -allowgacdeployment -immediate

Echo Installing BugDatabase.wsp
%stsadm% -o addsolution -filename BugDatabase.wsp
%stsadm% -o deploysolution -name BugDatabase.wsp -allowgacdeployment -immediate

Echo Installing CallCenter.wsp
%stsadm% -o addsolution -filename CallCenter.wsp
%stsadm% -o deploysolution -name CallCenter.wsp -allowgacdeployment -immediate

Echo Installing ChangeRequest.wsp
%stsadm% -o addsolution -filename ChangeRequest.wsp
%stsadm% -o deploysolution -name ChangeRequest.wsp -allowgacdeployment -immediate

Echo Installing ComplianceProcessSupport.wsp
%stsadm% -o addsolution -filename ComplianceProcessSupport.wsp
%stsadm% -o deploysolution -name ComplianceProcessSupport.wsp -allowgacdeployment -immediate

Echo Installing ContactsManagement.wsp
%stsadm% -o addsolution -filename ContactsManagement.wsp
%stsadm% -o deploysolution -name ContactsManagement.wsp -allowgacdeployment -immediate

Echo Installing DocumentLibraryReview.wsp
%stsadm% -o addsolution -filename DocumentLibraryReview.wsp
%stsadm% -o deploysolution -name DocumentLibraryReview.wsp -allowgacdeployment -immediate

Echo Installing EventPlanning.wsp
%stsadm% -o addsolution -filename EventPlanning.wsp
%stsadm% -o deploysolution -name EventPlanning.wsp -allowgacdeployment -immediate

Echo Installing ExpenseReimbursementApproval.wsp
%stsadm% -o addsolution -filename ExpenseReimbursementApproval.wsp
%stsadm% -o deploysolution -name ExpenseReimbursementApproval.wsp -allowgacdeployment -immediate

Echo Installing HelpDesk.wsp
%stsadm% -o addsolution -filename HelpDesk.wsp
%stsadm% -o deploysolution -name HelpDesk.wsp -allowgacdeployment -immediate

Echo Installing InventoryTracking.wsp
%stsadm% -o addsolution -filename InventoryTracking.wsp
%stsadm% -o deploysolution -name InventoryTracking.wsp -allowgacdeployment -immediate

Echo Installing ITTeamWorkspace.wsp
%stsadm% -o addsolution -filename ITTeamWorkspace.wsp
%stsadm% -o deploysolution -name ITTeamWorkspace.wsp -allowgacdeployment -immediate

Echo Installing JobRequisition.wsp
%stsadm% -o addsolution -filename JobRequisition.wsp
%stsadm% -o deploysolution -name JobRequisition.wsp -allowgacdeployment -immediate

Echo Installing KnowledgeBase.wsp
%stsadm% -o addsolution -filename KnowledgeBase.wsp
%stsadm% -o deploysolution -name KnowledgeBase.wsp -allowgacdeployment -immediate

Echo Installing LendingLibrary.wsp
%stsadm% -o addsolution -filename LendingLibrary.wsp
%stsadm% -o deploysolution -name LendingLibrary.wsp -allowgacdeployment -immediate

Echo Installing PhysicalAssetTracking.wsp
%stsadm% -o addsolution -filename PhysicalAssetTracking.wsp
%stsadm% -o deploysolution -name PhysicalAssetTracking.wsp -allowgacdeployment -immediate

Echo Installing ProjectTrackingWorkspace.wsp
%stsadm% -o addsolution -filename ProjectTrackingWorkspace.wsp
%stsadm% -o deploysolution -name ProjectTrackingWorkspace.wsp -allowgacdeployment -immediate

Echo Installing RoomEquipmentReservations.wsp
%stsadm% -o addsolution -filename RoomEquipmentReservations.wsp
%stsadm% -o deploysolution -name RoomEquipmentReservations.wsp -allowgacdeployment -immediate

Echo Installing SalesLeadPipeline.wsp
%stsadm% -o addsolution -filename SalesLeadPipeline.wsp
%stsadm% -o deploysolution -name SalesLeadPipeline.wsp -allowgacdeployment -immediate

iisreset



Open NotePad and copy the above into it. Save it as installWSP.bat in the directory with all of the WSP files in it and then run it on the server. If all goes as planned it should install them all.

Important Notes:
  • Modify the second line to the path of where the stsadm tool is located. The above is the default location. Change the dashes (-) to back slashes, which this blog editor cannot display.
  • This will restart your IIS services so warn users if they're in SharePoint or other web applications on the same server.
  • If an error occurs for whatever reason, you can comment out the @Echo (::@Echo) and put a 'pause' in there somewhere. This will show all input and responses as well as pause the screen so it remains open. You can keep running the script if some were already installed, it will error stating it already exists.

I hope this helps! If you're looking for further support on your SharePoint install or would like further customizations, please contact us for information on SharePoint administration and customizations.





Updating a SharePoint Microsoft Application Template

Share |
clock August 20, 2008 17:35 by author David Lozzi
If you're not using one of the 40 free fabulous application templates from Microsoft for SharePoint v3, then you need to! These are great templates, and best of all their free!

I continue to explain my story a bit, so if you just want to know how to fix it, scroll down to THE FIX.

But what happens if you want to modify them? I was slamming my head on the desk trying to figure this out. I’ve posted it to newsgroups and asked whoever I can find, and no one knew. I finally just tried something and it worked. We’re using the Budgeting and Tracking Multiple Projects application template form, and we wanted to add a few fields that are important to how we do business. So going to the Project List, then Settings > List Settings, we were able to add new columns to the list. The issue is when we go view the item, say edit an existing project or create a new one, these fields never showed up! How am I suppose to get work done around here. After trying to modify it with SharePoint Designer, I even tried adding a custom SharePoint List form, and that didn’t bring in the fields I wanted  by default, and again, slamming my head on my desk, I figured it out.

At one point somewhere in my insane quest to figure this out, I saw that these project items are content types. I ran with that for a little, but in Site Settings, under Site content types, this item doesn’t appear, so I can’t modify it that way. I’m not sure why it doesn’t appear there, but it just doesn’t. I’m sure there’s a good enough reason. I think it’s because this is a list content type not a site content type.

So, onto the fix….

THE FIX

What you need to do is “trick” your list into updating this “content type”. Go to List Settings. First add the columns you want added to the list. Then Advanced Settings in the first column at the top. In the first section, select Yes to “Allow management of content types?”. After clicking OK you will see the setting page is slightly different now. There is a new section in the middle: Content Types.

In the Content Types section, click the content type name, in my case it was Project. On the List Content Type screen, you will see all of your columns, except for the ones you added. Click “Add from existing site or list columns” at the bottom. The first view should show List Columns in the dropdown for Select columns from. In the list box to the left, you should see all of the columns you’ve added. Pick the fields you want to include (You can click the first one, hold shift and click the last one to select all of them) then click Add. Click OK and now your columns are in the list for the content type.

Once you have your columns in there, click Settings in the breadcrumb trail at the top. If you don’t see it, just get back to the List Settings. Click Advanced Settings again, and select No to “Allow management of content types?”. Click OK and now your fields are on the New, Edit and Display forms!

Note:
In my case, I needed to go back in and specify no to the “Allow management of content types?” because the New menu option wasn’t visible anymore in the list. Switching it back to No still shows the columns and everything works great again.

Please let me know if this helps or if you have found a different way!  If you're looking for further support on your SharePoint install or would like further customizations, please contact us for information on SharePoint administration and customizations.



RSSRSS Subscribe

About David Lozzi

I love what I do. I'm not the sketchy type that hides in his basement coding all day. I have a beautiful wife and two great children. I've spent my last 10 years plus in the technology arena. more...

Login