JSON formatting in SharePoint lists

Copper Contributor

Hi Guys

 

I am pretty new with PowerShell, and trying to find a way to achieve the following.

 

We have built a site template with different lists, which are using JSON formatting for columns such as 'Finish Date', 'Status' etc. We have also applied some formatting to the body and footer for the items.

 

Now we have this template, is there an easy way to copy these JSON formats into existing sites? The site template is otherwise the same (i.e. field names), just no JSON.

 

I have looked at some PNP cmdlets but can't quite find what I want!

 

Hope that makes sense!

3 Replies
Hi, can anybody help? Thanks!

@robtaylor1996 You can apply JSON formatting to columns using PnP PowerShell. check below links for the same:

  1. Using PnP PowerShell to apply modern column formatting 
  2. Add Column Formatting with PnP PowerShell 

Also, you can apply form JSON formatting using API, Thanks to @Beau Cameron :

Custom Formatter 


Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

Thanks for the tag!

It also looks like JSON Formatting is supported in Site Designs now. I haven't tested it, but another person had mentioned it in a GitHub issue. So there are a couple options at this point.