Group Blog

Governance Planning Template
The following link will take you to the Microsoft TechNet page that has the Governance planning document available for download. The template was created by Joel Oleson and Mark Wagner.

Its a great roadmap is you are just starting your governance planning or even wondering what it might entail.

Governance Planning Template
Data Forms and SQL Server, Part 2

In this second post of the SharePoint Data Form Web Part and SQL Server series, I will demonstrate how to maintain the FAQ Database displayed in the previous posts. I had a lot of fun trying to make the categories dropdown work just right. I will share more about that in the next post.

Using the same steps as in my previous post on Data Forms and SQL Server, I have configured two database connections in SharePoint Designer – this time to the Faqs and FaqCategories tables instead of a view. First, I will use a Data Form Web Part to add new FAQ Categories. Then I will use a Data Form Web Part to add entries to it.

First, a quick sidebar on Data Forms and Data Views: there is an option to link Data Sources together in SharePoint Designer.

This is similar to using a SQL Server View to join tables together, except that the link in this case exists in SharePoint Designer and not in the database. I explored the possibility of using this in my FAQ maintenance, but SharePoint Designer only allows Data Views against a Linked Source – no Data Forms.

So I have created my FaqCategories Data Source to the Data Source Library and switched to the Data Source Details tab. I highlight the Web Part Zone where I want to insert it – "Zone 2."

Now, select only the FaqCategoryName field and click on Insert Selected Fields as… to display the Data View and Data Form options. The FaqCategoryID field is managed by the database itself.

I am going to add a Data View Web Part and then change the properties of the view to allow Categories to be added, changed and deleted. I am going to select the Multiple Item View option to insert a form for displaying multiple rows of data.

Next, I am going to click on Data View Properties and switch directly to the Editing tab.

Select all three checkboxes to enable edit, delete and insert. Next, click the OK button at the bottom of the dialog. The Data View now looks like this:

If I look at my page in the browser, it now is a simple web application maintenance program over a SQL Server database.

So this top Data Form can be used for maintaining the categories, but now I will add another Data Form for adding frequently asked questions and associating them with these categories. I am now looking at my Faqs Data Source in the Data Source Details tab. I will select only the FaqQuestion, FaqAnswer and FaqCategoryID and insert them as a New Item Form in a different Web Part Zone on the page. I do not need to select the FaqID column because it is the identity column for this table and automatically increments.

So now the right side of my web part page looks like this:

The problem with this is that the bottom Data Form is not user-friendly because you have to know the exact FaqCategoryID from the database in order to associate a question with a category. So I am going to change the Text Box for FaqCategoryID to a Drop Down List to make it more user-friendly. Watch for the next post – Data Forms and SQL Server, Part 3 – to see how I finish off this simple maintenance application.

Data Forms and SQL Server, Part 1

In my previous series of posts, I demonstrated how to create a FAQ page on SharePoint using two SharePoint lists. In this post I will demonstrate creating a FAQ page on SharePoint using SQL Server and the Data View Web Part. The following post will demonstrate how to maintain the SQL Server table using a Data Form Web Part. It should be noted that I often use the terms "Data Form Web Part" and "Data View Web Part" interchangeably. A Data Form Web Part is a Windows SharePoint Services 3.0/Moss 2007 phenomenon while a Data View Web Part was introduced in the previous versions. Technically, however, it could be stated that a Data View Web Part will allow one to view data from a datasource in read-only mode, while a Data Form Web Part will allow the data to be edited. With that in mind, this post will demonstrate a Data View Web Part and the following one a Data Form Web Part.

First, I should mention that I have already created two tables in a SQL Server database. One table is a FAQ Questions table and the other is a FAQ Categories. They are related via FAQCategoryID.

Also, to keep things simple I have set up SQL Server Authentication on my database, SharePointDemoDatabase. In addition, I have created a view—vFaqs—that contains FaqCategoryName, FaqQuestion and FaqAnswer.

Begin by creating a blank SharePoint site and opening its default page in SharePoint Designer. Refer to the previous posts if you need assistance. Once the site has been opened in SharePoint Designer, click Data View à Manage Data Sources from the top menu. In the Data Source Library window, click on Database Connections to add a connection to our SQL Server database.

In the dialog that appears, click on Configure Database Connection.

Enter the required information including the server name, username and password. Keep the provider name at the default.

Because I am using SQL Server authentication, I am warned about other authors of this web site seeing the contents of the connection string. For the purpose of keeping this exercise simple, click OK to accept the warning and continue. Note that in a production environment you should use Windows Authentication with integrated security for this. The next dialog allows you to select your database in a drop-down list and then to choose the table or view that you want to display.

Select the vFaqs view. From this point on, things are just as they were in the previous posts. You may set your sorting and grouping options (I sorted mine by FaqCategoryName).

After clicking OK, click the Show Data button to see the Data Source Details. Highlight your Web Part Zone on the web page and choose Insert Selected Field as… à Multiple Item View from the Data Source Details tab.

When the Data View is inserted into the Web Part Zone, choose the Sort and Group option in order to change the grouping options.

Be sure to check "Show group header" so that the expand/collapse icon appears in your view.

You could optionally add a secondary sort order of FaqQuestion to assist in finding questions more quickly. One final piece of clean-up that can be done is to the FaqCategoryName label that appears on the ensuing Data List. To do that, highlight the text in the label in SharePoint Designer and click the delete key. Then highlight the colon that appears just to the right of it and remove it the same way. Save the page and view it in a browser. Remove the FaqCategoryName from the list of fields to display since it is already a group field. Remove the header rows and add a title to the web part.

Assuming you have data entered, your page should look something like this:

In the next post I will demonstrate how to use the Data Form Web Part to create a user-friendly page for maintaining this list in SQL Server.

(Adapted from http://sharepointblog.kellerschroeder.com/2009/01/data-forms-and-sql-server-part-1.html )

 

 

Custom Errors

This just saved me a lot of time so I thought I would share. 

 

Anyone who has developed in SharePoint knows that the errors it gives can be very vague and unhelpful.  A quick fix for this on your development server is to turn off custom errors and enable the call stack to be viewed in the web.config file.

 

The web.config file should be located at C:\inetpub\wwwroot\wss\VirtualDirectories\80.  Remember to always create a backup of the file before making any changes.  Open the file and search for the customErrors node in the system.web section and change the mode attribute to "OFF".  Next find the SafeMode node under the SharePoint section and change the CallStack value to "true". 

 

This will give you detailed error messages and make debugging in SharePoint much easier.

Creating Data Forms in SharePoint Designer, Part 4: Sorting and Grouping

In the previous post I showed you how to add a Multiple Item View Data Form Web Part to your SharePoint page. Next, I will show you how to add sorting and grouping to it to make it more user-friendly. I have added some more questions to the Frequently Asked Questions list. The list currently looks like this:



I will open the web page (default.aspx) in SharePoint Designer and then click on the DataFormWebPart so that it is highlighted. You will notice the expansion arrow appear to the right:



When I click on the arrow, a menu appears for Common Data View Tasks:

 


I select the Sort and Group task and I am presented with the Sort and Group options window. Because I want to group by Category, I must add it first to my sort order list and then select the checkbox that reads "Show group header" with the default option of "Expand group by default". The options now look like this:



When I click OK, I return to the Common Data View Tasks menu. From here I can set additional options such as how many items to display per page and other formatting options. I will leave everything else alone for now and save my web page. When I preview it in my browser it now looks like this:

 


 


In a future post I will demonstrate how to use the Data Form Web Part with a SQL Server database instead of a SharePoint list. I will also demonstrate how to use the Data Form Web Part to collect information from a user. Is there something in particular you would like to see demonstrated? Leave a comment and let me know.

(Adapted from http://sharepointblog.kellerschroeder.com/2009/01/creating-data-forms-in-sharepoint.html )

Creating Data Forms in SharePoint Designer, Part 3: Building the Data Form Web Part

In the last post I showed you how to create a site with a blank Web Part page and two SharePoint lists for keeping storing FAQ categories and questions. In this post I will show you how to create a form against those two lists and insert it onto the page.


On your desktop, open up SharePoint designer. If it does not automatically open to your site, then click on File -> Open Site and open your site. Your designer panes should look something like this:





Double-click on the default.aspx page to open it. Next, click in the open area of the left "Web Part Zone" so that it becomes highlighted with a bold blue border like this:





From the menu, select Task Panes ->Data Source Library to make the Data Source Library pane come to the front (mine is displayed on the right side of the screen).




If you followed along in the last blog post, you will see two SharePoint Lists in the pane: FAQ Categories and Frequently Asked Questions. Hover over Frequently Asked Questions so the drop-down arrow appears, then click Show Data.




Click on "Question" so that it is the only field in the row that is highlighted. Then, holding in your Ctrl key, click on "Answer" so that it is highlighted also.




With your Web Part Zone still highlighted, click the Insert Selected Fields as… button and choose Multiple Item View. With that, your DataFormWebPart will be added to the Web Part Zone and is ready for you to customize.




Save your work by hitting Ctrl+S or File -> Save. Answer Yes to the dialog that appears.





In the next post, I will walk through the sorting and grouping options.

(Adapted from http://sharepointblog.kellerschroeder.com/2008/12/creating-data-forms-in-sharepoint_23.html )

Creating Data Forms in SharePoint Designer, Part 2: Custom Lists with Lookup Column

First, from my top-level site I created a new SharePoint site called FAQ. I made it a "Blank Site" which means that a new site will be created for me with a single page called "default.aspx." The page will be essentially empty, but we will put our Frequently Asked Questions on it shortly.

   

   

Next I created two custom lists in my FAQ site. The first list is called FAQ Categories and only has one field in it – the default field called Title. The second is called Frequently Asked Questions. In addition to Title, it has three required fields in it: Question, Answer and Category. Category is a "Lookup Column" that is populated from the FAQ Categories list.

I then added a couple of records to the Categories list: "Miscellaneous" and "Contact." Now if I add a record to my Frequently Asked Questions list, it looks like this:

   

Go ahead and create these two lists on your FAQ site. In the next post I will walk through creating the Frequently Asked Questions page grouped by Category.

(Adapted from http://sharepointblog.kellerschroeder.com/2008/12/creating-data-forms-in-sharepoint.html)

 

Create Data Forms in SharePoint Designer, Part 1

I am often asked about options for gathering and displaying form data on SharePoint sites. As most SharePoint pros do, I often immediately mention InfoPath. Many times the inquirer will balk because of the licensing fees associated with InfoPath or Forms Server. So I introduce the out-of-the-box forms that SharePoint gives you when you create a list in SharePoint: a form for listing the data, a form for displaying a particular row of data, a form for editing the data and a form for adding a row. I then explain some of the limitations of using those default forms and how it is possible to get around some of those limitations using SharePoint Designer. For example, what if the source of the data is SQL Server or some other Relational Database Management System? Using SharePoint Designer, you can create a Data Form Web Part to view data from a variety of sources besides just SharePoint Lists. In the example below, I am displaying data from a SQL Server database grouped by a "Category" field.



It gets even better than that! You do not even have to be a programmer to develop a form like this…seriously. Over the next several weeks I will demonstrate numerous ways to gather and display form data on Windows SharePoint Services 3.0 using the features included in SharePoint Designer. I will point out limitations that you should consider for each scenario. One post in the series will be displaying Frequently Asked Questions from a SQL Server database.

(Adapted from at http://sharepointblog.kellerschroeder.com/2008/11/create-data-forms-with-sharepoint.html)

Web Part Management Page
I can never seem to remember this,  and it is something everyone should know so I decided to post it here.  To get to the web part management page when a broken or malfunctioning web part is keeping a page from loading add ?contents=1 to the end of the page url.
Book Reviews - ESPUG Library?
I accepted one of the books for review (a short one :) but think it may be a good idea to read/review the books then return to them so that others in the group may review or read.  Suggestion is to have an ESPUG library of sorts?  I realize this involves having space for the books etc.  What does everyone else think on this?  Cyndi

 ‭(Hidden)‬ Admin Links