List View row Formatting: Discussion Board

Hi Friends,

I have seen that in on-prem many of the users are using the discussion feature, but in SharePoint Online we do not have this feature. To give it a thought I have implemented somewhat similar functionality.

Discussion board formatting gives the ability to showcase the discussion which is a page, under specific category which will make more sense to the discussion board. So, whatever category you want to create, create the folder for that and the corresponding pages beneath it.

This discussion board formatted displays the banner image (not the thumbnail image) and showcases it in the front along with the title, description, Likes, Comments, Date of last edit, and the owner of the page(not the author).

No new column needs to be created only the existing column needs to be added to the view. For that execute the below PnP code

# If want to modify the existing view
Set-PnPView -List "Site Pages" -Identity "<Name of the view>" -Fields "Modified",

# If want to create a new view
Add-PnPView -List "Site Pages" -Title "Discussion Board" -Fields "Modified","_CommentCount",

The above PnP code will add all the necessary columns to the view. Now paste the JSON in the formatter.

Code can be found here

List View row Formatting: Discussion Board

Hope this will help you.

Happy Coding..!!
#Microsoft #RowFormatting #SharePointWidgets


Popular posts from this blog

Checking user permission in SharePoint Framework (SPFx) webpart

SharePoint Framework (SPFx) : Cascade dropdown in webpart properties

SharePoint Image Gallery