Imagine a case where you want to apply the same JSON custom formatting in all SharePoint list views for a list and this list has a lot of views. You would need to do it one by one in all views, or you could use PowerShell to script it. But not all the times you are able install PowerShell in your work computer.
That’s when Power Automate comes handy, we can create a button Flow to run this action for us.
The same idea can even be reused to be part of a bigger automation process.
Check out how to do it.
Manual Trigger
Create a flow with a manual trigger and the following parameters:
- Site URL
- List Name
- Custom Formatter
And initialize variables to associate all the 3 values as below (for clarity and later manipulation).
Escaping Single Quotes from the JSON content
With a compose action as below, use the following expression to escape single quotes from the CustomFormatter, otherwise you may run into issues if the content has a single quote:
Source link
More About This Author
-
SharePoint and Office 365 Consultant/Developer always trying to get the best from Microsoft stack (Microsoft 365/Azure/Power Platform and related stuff).
Living in Ireland since 2018, I had previously worked in Brazil as a consultant/developer for Office 365, SharePoint and related technologies for almost 10 years.
Array
- Modern Workplace13 April 2024Power Pages and Cloud Flows – Validate user against Dataverse records based on Contact ID
- Modern Workplace6 April 2024Download SharePoint library files in Power Pages with JavaScript and Cloud flows – Improved code using jQuery & option to open PDF file in a new tab
- Modern Workplace13 March 2024Handle multiple N:N records associate and disassociate requests with JavaScript and Power Pages Web API
- Modern Workplace17 February 2024Generic JavaScript Functions to Associate and Disassociate Dataverse records using the Power Pages Web API