SharePoint JSON View with folders

%3CLINGO-SUB%20id%3D%22lingo-sub-1419035%22%20slang%3D%22en-US%22%3ESharePoint%20JSON%20View%20with%20folders%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1419035%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20trying%20to%20use%20the%20Document%20library%20sample%20at%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fpnp%2Fsp-dev-list-formatting%2Ftree%2Fmaster%2Fview-samples%2Fdocument-library%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2Fpnp%2Fsp-dev-list-formatting%2Ftree%2Fmaster%2Fview-samples%2Fdocument-library%3C%2FA%3E%26nbsp%3Bto%20create%20a%20custom%20view%20for%20a%20policy%20library.%26nbsp%3B%3C%2FP%3E%3CP%3EWhat%20I%20want%20however%20is%20to%20separate%20each%20departments%20draft%20policies%20into%20folders%20or%20document%20sets%20(so%20that%20only%20certain%20members%20can%20edit%20the%20drafts).%20I%20can%20get%20the%20view%20work%20for%20the%20documents%20but%20I%20would%20like%20the%20folder%20level%20to%20show%20like%20normal.%20There%20should%20be%20no%20files%20saved%20at%20the%20top%20level.%3C%2FP%3E%3CP%3EIs%20there%20any%20way%20that%20I%20can%20modify%20the%20JSON%20to%20check%20for%20the%20content%20type%3F%20This%20isn't%20as%20simple%20as%20some%20of%20the%20formats%20that%20are%20applying%20an%20additionalRowClass%20where%20it%20checks%20for%20a%20folder%20since%20there%20is%20a%20lot%20of%20code.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1419035%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDocument%20Library%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EViews%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Highlighted
Occasional Contributor

I am trying to use the Document library sample at https://github.com/pnp/sp-dev-list-formatting/tree/master/view-samples/document-library to create a custom view for a policy library. 

What I want however is to separate each departments draft policies into folders or document sets (so that only certain members can edit the drafts). I can get the view work for the documents but I would like the folder level to show like normal. There should be no files saved at the top level.

Is there any way that I can modify the JSON to check for the content type? This isn't as simple as some of the formats that are applying an additionalRowClass where it checks for a folder since there is a lot of code.

 

Thanks

0 Replies