Forum Discussion
Sharepoint Modern Calendar Filter JSON
- Aug 11, 2022
Hello as733y
you can filter your view and exclude the items, that you don't want to show.
Is that a way to go?
Regards, Dave
as733y If you want to hide list items based on Yes/No field, best way is to use the filtering in list view settings as suggested by DaveMehr365 .
If you don't want to use the view filtering, you can achieve this using JSON as well. You have to add "display" property inside "style" of outer most element in view formatting JSON.
For Example:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",
"hideSelection": true,
"hideColumnHeader": true,
"rowFormatter": {
"elmType": "div",
"style": {
"display": "=if([$RequestCancelled_x003f_], 'block', 'none')"
},
"txtContent": "[$Title]"
}
}
Documentation: Use view formatting in SharePoint
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.