Forum Discussion
Can JSON formatting check if document is checked out?
- Jun 01, 2024
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)
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)
- Tyler_BorchardtJun 03, 2024Brass Contributor
Rob_Elliott - Thank you, this is exactly what I was looking for!