May 31 2024 04:51 PM
In a SharePoint Document Library, I'm wondering if JSON formatting can check if a document is checked out. What I'm trying to do is change a value of a "Status" column to "under review" if the document is checked out.
I tried to Google, use CoPilot, and bing to find an answer, but couldn't find a conclusive answer if it's even possible.
Thank you for any guidance provided!
Jun 01 2024 03:50 AM - edited Jun 01 2024 03:51 AM
Solution@Tyler_Borchardt yes this is do-able. Make sure that in your view of the document library you are displaying the Checked Out To column (you need to go to Library settings to do this). That column has the internal name of CheckoutUser. Then format your status column with the following JSON:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"txtContent": "=if([$CheckoutUser]=='','','Under Review')"
}
Rob
Los Gallardos
Microsoft Power Automate Community Super User.
Principal Consultant, SharePoint and Power Platform WSP Global (and classic 1967 Morris Traveller driver)
Jun 03 2024 07:37 AM
@Rob_Elliott - Thank you, this is exactly what I was looking for!
Jun 01 2024 03:50 AM - edited Jun 01 2024 03:51 AM
Solution@Tyler_Borchardt yes this is do-able. Make sure that in your view of the document library you are displaying the Checked Out To column (you need to go to Library settings to do this). That column has the internal name of CheckoutUser. Then format your status column with the following JSON:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"txtContent": "=if([$CheckoutUser]=='','','Under Review')"
}
Rob
Los Gallardos
Microsoft Power Automate Community Super User.
Principal Consultant, SharePoint and Power Platform WSP Global (and classic 1967 Morris Traveller driver)