There are many helpful, informative blogs online about SharePoint’s out-of-the-box Discussion Board (how to customize, or how to work with the data programmatically). A quick search on this should return a lot of very helpful links. I recently worked on a project to implement a Discussion Board for a customer that required some customization.
I wanted to write a blog to provide a high-level explanation of the data structure of a Discussion List since this is initially where I began my research when starting the project. The first discovery I made was that Discussion Boards are not typical SharePoint Lists in the way that the data is stored.
Discussion Board Settings
Taking a look at the List settings of the Discussion Board, you can see it is based off of two Content Types:
Discussion boards, unlike standard SharePoint lists have two levels of list items. Discussions are the Topics that are started by users. Messages are the Replies to these topics.
If you go into Site Settings, then Site Content Types, you can see that the Discussion Content Type is a Folder Content Type and the Message Content Type is a List Content Type.
Another way to think about this is: Every Topic or Discussion is actually a Folder and any Replies to that Discussion are the List Items that are stored in that Folder.
The Discussion List also has three Views that are provided by default:
The Subject View is the Top-level view of the Discussion Topics. This is the AllItems.aspx view that we are used to seeing in SharePoint Lists. See the following screenshot of the default Subject view:
Each Discussion Topic appears as a link in the Subject column. You can then click on the link to go to the second default view (either the Threaded or the Flat View) that will display the replies to the particular Discussion. The Subject column is the only parameter passed in the URL when viewing the Replies to the discussion. All of these views can also be customized just like you are used to in a SharePoint list. You can also create a new view for a Discussion Board, but it must be based off of one of these existing views.
Difference between Threaded and Flat Views
The Threaded View is similar to a tree view of all of the Replies to a discussion. For example it will show indentation to reflect exactly what reply within the thread the user has replied to.
Example screenshot of Threaded View:
Notice the indentation on the left. “Reply 1” and “Reply 2” are responses to the initial discussion topic, whereas “Response to Reply 1” is a reply to “Reply 1”.
The Flat view will show all replies for the Topic without any indentation and display the replies in chronological order based off of the time the reply was posted or last edited.
Example screenshot of Flat View:
Each view has a Posting Information Bar (the blue bar) that will show the Discussion Details and allow you to reply to or edit the discussion with the ‘View Properties’ link. When a discussion is first entered, it will display ‘Started’. Any replies will show ‘Posted’ unless they are edited and then it will automatically update the bar to ‘Edited’. All other settings in the Discussion Board are similar to other SharePoint Lists. For example, you can turn content approval on, versioning, set alerts, add workflows, etc.