SharePoint’s JSON formatting capabilities empower users to customize the look and feel of SharePoint lists and libraries effortlessly. One common customization request is to remove the column name from the group header in a grouped SharePoint list view. In this blog post, we’ll explore why you might want to remove the column name and provide a step-by-step guide on achieving this using SharePoint JSON formatting.
Why Remove the Column Name?
When organizing data in SharePoint lists, you may find that the default group headers display the column names. While this is useful in many scenarios, there are times when you might prefer a cleaner, more streamlined view. Removing the column name from the grouped header can help reduce visual clutter and focus on the column value for each group.
How to Remove Column Name from Group Header?
Follow below steps to remove the column name from group header in SharePoint online or Microsoft Lists’ list view:
1. First, navigate to the SharePoint list for which you want to apply the JSON formatting. Click on the “Switch view options” drop down from top right corner of the list and select the view where you want to remove the column name from the group header.
2. Once in the desired list view, click on the “Switch view options” drop down again and select the “Format current view” option, which opens the list formatting pane.
3. Within the list formatting pane, locate the “Advanced mode” option and click on it to access the JSON formatting editor. Here you can modify the JSON to achieve the desired customization.
4. To remove the column name from the group header, copy below JSON and paste it in the JSON formatting editor:
5. Click on the “Save” button within the JSON list formatting pane to apply the changes.
Once saved, the SharePoint list view will reflect the updated formatting, with the column name effectively removed from the group header.
Note
If you have applied the “Group by” on Person or Group (people field) OR Lookup column, [object object] will appear in the group header after applying above JSON. In that case, you will have to modify above JSON slightly as per the following table:
Type of grouped column
Part of the JSON to be changed
Change to
Person or Group
@group.fieldData.displayValue
@group.fieldData.title
Lookup
@group.fieldData.displayValue
@group.fieldData.lookupValue
Also, if you have grouped your SharePoint list view based on two columns (for example: person or group and single line of text column), you can change the text to show (txtContent) based on display name of column like:
By following these steps, you can harness the power of SharePoint’s JSON formatting capabilities to achieve a cleaner and more tailored presentation of your grouped list view data.
I hope this guide has been helpful in demonstrating how to remove the column name from the group header in a SharePoint list view using JSON formatting.
Microsoft recently introduced a new feature of commenting in SharePoint Online lists and Microsoft lists. Using this feature users will be able to add and delete comments on list items. Users can view all comments on a list item and filter between views that show comments or activity related to an item in details pane.
Microsoft has started rolling out this feature to all SharePoint Online tenants in December 2020 release, see Roadmap.
Where can you find Comments options?
Comments options are currently located at below three places in SharePoint Online/Microsoft lists:
List view
Users can see which list items have comments when they access the SharePoint Online list view or Microsoft list home page. Comments option will be shown on command bar when you select a list item as well as at the right hand side of Title column. When you hover over on comments icon it will show you the count of comments added to the list item.
Comments options in List view
Display/Edit form
By default, users will see a new comments pane alongside the list item form when they access a list. Users can toggle the comment pane visibility by clicking the comments icon. When you hide comments, the pane does not collapse. The comments pane will be closed by default for lists customized by Power Apps.
Comments options on Display form
Details Pane
Users can see the Comments and All activity related to list item on details pane. Users can filter views that show comments or activity by using the dropdown under “More details” section.
Comments options in Details pane
Permission Considerations
Comments follow the permission settings inherent in SharePoint Online and Microsoft Lists.
Users with read-only permission can only view comments.
Those with list edit permission can make comments as well as delete comments; editing comments is currently not possible.
Where the Comments will be stored?
Comments are stored in the schema for each list, which is based on the SharePoint storage platform.
Working with SharePoint REST APIs
As comments are stored within the list schema itself and not with list items, it is not possible to fetch comments using $select with /items endpoint. However, you can get the list item comments using below endpoint:
Currently it is not possible to get the actual list item comments value using JSON formatting. But, you can get the count of comments added to list item using [$_CommentCount] which is an internal name of SharePoint list column that returns the count of list item comments.
Any user can delete the list item comments. Currently there is no way to disable deletion of comments.
Maximum characters limit in list comments: 2000 characters
Classic lists that are not yet built to show up in modern user interfaces, like Task lists, will not have this commenting feature.
Commenting on lists in Teams is not available with this release.
Comments are not indexed by Search.
Enable/Disable Comments
Currently it is not possible to disable commenting at the site or list level. Microsoft is working on the new feature which will allow users to enable/disable the comments for individual SharePoint lists. However, Admins can enable/disable this feature at the organization level by changing the CommentsOnListItemsDisabled parameter in the Set-SPOTenant PowerShell cmdlet:
Get a colleague’s attention to an item in a list by @mentioning them within list comments. That person will receive a notification and a link that takes them directly back to the item, to review the comment and take the requested action.
I hope you liked this blog. Give your valuable feedback & suggestions in the comments section below and share this blog with others.
The JSON formatting sample given in this blog post demonstrates displaying flags of the counties selected in the multiple selection SharePoint choice column.
SharePoint Online JSON formatting is a powerful tool that allows users to customize the display of list data, bringing a new level of functionality and aesthetics to SharePoint online lists. In this blog post, we’ll explore an exciting and educational application of JSON formatting for displaying country flags within SharePoint lists.
The JSON formatting sample given in this blog post demonstrates displaying flags of the counties selected in the single selection SharePoint choice column.
SharePoint Online is a powerful collaboration and content management platform that empowers organizations to create, manage, and share information seamlessly. JSON formatting in SharePoint online allows users to customize the look and feel of the columns, views and forms in their SharePoint lists and libraries.
Earlier this year Microsoft updated the SharePoint JSON formatting feature and blocked most of the external domain image sources by default in custom JSON column and view formatting.
Only images from the following domains are allowed by default:
tenant domain, configured multi-geo domains and vanity domains (company.sharepoint.com)
The Solution – Modifying HTML Field Security Settings:
To address the challenge of displaying external web site domain images in JSON formatting, one effective solution is to adjust the HTML field security settings of your SharePoint site. This involves whitelisting trusted external domains or CDNs to allow their images to be displayed within your SharePoint environment. Follow these steps to implement the solution:
1. Go to your SharePoint online site.
2. Click on Settings (gear) icon from top right corner and select Site information.
3. Click on View all site settings link from Site information panel, it will open the SharePoint site settings page.
4. Under the Site Collection Administration section, locate and click on the HTML Field Security settings link.
5. Select Allow contributors to insert iframes only from the following domains, add external web site domain from where you are using the images under Allow iframes from this domain text box and click Add button.
6. Click OK button at the bottom of HTML Field Security settings page to save the changes.
Allow external site domain from SharePoint HTML Field Security settings
7. Navigate back to the SharePoint list where you are using external image with JSON formatting and refresh the web page. Now, you should see that the external images are working using the SharePoint Online JSON formatting.
Output
Before adding external site domain to SharePoint HTML Field Security Settings:
External Image URLs are not working in SharePoint Online JSON formatting
After adding external site domain to SharePoint HTML Field Security Settings:
Working External Image URLs in SharePoint Online JSON formatting
You can add one image per SharePoint list item using SharePoint image column and the images are stored in Site Assets library by default. Using SharePoint online out of the box capabilities, there is no way to download the images from SharePoint list image column. In this blog, I will demonstrate how to create add a button within a SharePoint Online/Microsoft Lists modern experience view which downloads the image from SharePoint image column.
You can use below JSON to add a button in SharePoint online list column to download the image from image column in same list. This JSON formatting can be applied to any existing column in your SharePoint online list OR if you want to create a new column and then apply JSON formatting, follow the steps given in this blog: Working with SharePoint Online/Microsoft List Comments using JSON Formatting
Where [$Image] is the internal name of your SharePoint image column. Also, make sure to edit the above JSON and replace the **YOUR-LIST-NAME** placeholder with your list’s name, as it appears in the list URL (including special characters).
This SharePoint JSON formatting code adds a button within a SharePoint Online/Microsoft Lists modern experience view which downloads the image from SharePoint image column:
Download Image from SharePoint Image column using JSON formatting
SharePoint Online is a powerful platform for managing and sharing documents and other types of content within an organization. One of the key features of SharePoint Online is its ability to use JSON View formatting to customize the look and feel of lists and libraries.
However, applying JSON View formatting can be a time-consuming and repetitive task, especially if you need to apply the same formatting to multiple sites or lists. Fortunately, we have a command-line tool called CLI for Microsoft 365 that makes it easy to automate this process.
The first step is to install CLI for Microsoft 365. You can do this by following the instructions on the official documentation page: CLI for Microsoft 365 – Installation
Then you can use below CLI for Microsoft 365 script to apply JSON View formatting to your SharePoint online list:
# Display name of SharePoint list
$listName = "Ganesh Sanap Blogs"
# Name of SharePoint list view
$viewName = "All Items"
# JSON to apply to view formatting
$jsonViewFormatting = @'
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json",
"additionalRowClass": "=if([$DueDate] <= @now, 'sp-field-severity--blocked', '')"
}
'@
# Get Credentials to connect
$m365Status = m365 status
if ($m365Status -match "Logged Out") {
m365 login
}
# Apply JSON view formatting
m365 spo list view set --webUrl $siteUrl --listTitle $listName --title $viewName --CustomFormatter $jsonViewFormatting
Once you run above script successfully and navigate to SharePoint list view, you will see that new JSON view formatting is applied to your SharePoint online list view using CLI for Microsoft 365:
SharePoint Online – Apply JSON View formatting using CLI for Microsoft 365
Conclusion
Using CLI for Microsoft 365, you can easily apply JSON View formatting to your SharePoint Online lists, saving time and reducing the risk of errors. By following the steps outlined in this blog post, you can quickly get started with using CLI for Microsoft 365 to apply JSON View formatting to your SharePoint Online lists.
SharePoint online JSON view formatting is a powerful feature that allows you to customize the look and feel of your SharePoint lists and libraries. In my previous article I explained how to apply JSON View formatting using SharePoint REST API. In this article, we will see how you can easily apply JSON view formatting to your SharePoint lists and libraries using PnP PowerShell from the command line.
The first step in applying SharePoint JSON view formatting using PnP PowerShell is to install PnP PowerShell module on your machine. To install PnP PowerShell, open a PowerShell console as an administrator and run the following command (or follow this article – Installing PnP PowerShell):
Install-Module PnP.PowerShell -Scope CurrentUser
For this blog post, we will use below view formatting JSON as an example:
Once you run above script successfully and navigate to SharePoint list view, you will see that new JSON view formatting is applied to your SharePoint online list view using PnP PowerShell:
SharePoint Online: Apply JSON View formatting using PnP PowerShell
JSON View formatting in SharePoint Online can be a useful tool for customizing the way list/library data is presented to end users. This can help improve the user experience and make it easier for users to understand and interact with the SharePoint list/library data.
In this blog post, we will discuss how to apply JSON View formatting in SharePoint Online using SharePoint REST API.
If you want to reuse the JSON view formatting from existing SharePoint list view to newly created views in same SharePoint online list or in different SharePoint list with similar columns, you can get the custom JSON formatting applied on existing SharePoint list view using SharePoint REST API. You have to use the REST endpoint in below format to fetch the JSON:
Once you get the list view formatting JSON using above API call, you can use it in below example to apply JSON View formatting to newly created SharePoint Online lists. For this blog post, we will reuse the JSON view formatting from one of my blog posts – SharePoint Online: Highlight selected list item rows using JSON formatting
You can use below SharePoint REST API code for applying JSON view formatting to SharePoint online list:
Once above function executes successfully, navigate to your SharePoint online list view and you will see that JSON view formatting is applied to your SharePoint online list view:
SharePoint Online: Apply JSON View formatting using SharePoint REST API