-
Notifications
You must be signed in to change notification settings - Fork 1k
Hide columns in Library based on Content Type (if folder hide, if file show) #10265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hello @KaveSys, |
Hello @KaveSys,
Here's a sample JSON formatting to show a value only for files (not folders):
Replace Reference Documents:-
Let me know if further help is required. |
Hello @Amey-MSFT, In this way should not hide the column itself from the folder list, but hide only the content of the column values: With files: Only folders: |
@KaveSys: If you just want to show folders, I suggest to create a separate view with filter to show folders only and with just the columns you want to see. Wouldn't that solve your issue? |
@XueSheng-GIT nope. Is not the scope of my request and I'm happy to explain better if it's not clear. |
@KaveSys it seems at least I didn't understand the scope of your request. Would be great if you could explain better. |
@XueSheng-GIT as you can see in images above the "Document Language" column is visible in two cases:
I just want to hide the column "Document Language" only in the first case. When there are only folders in the list. |
Hello @KaveSys,
Then: Manually or using JSON buttons, switch between views. You can also use filters:
As, according to Microsoft's documentation on Show or hide columns in a list or library, while you can manually show or hide columns in a view, there is no built-in feature to automatically hide a column based on the presence or absence of files or folders in that view. Let me know if further help is required. |
What type of issue is this?
Question
What SharePoint development model, framework, SDK or API is this about?
💥 SharePoint Framework
Target SharePoint environment
SharePoint Online
What browser(s) / client(s) have you tested
Additional environment details
Issue description
Hello,
There is a way to show/hide a column in Document Library based on the Content Type? I want to show a column if is a file, instead hide if is a folder.
Which is the right way to do it?
The text was updated successfully, but these errors were encountered: