Forum Discussion
ManishH
Sep 03, 2020Copper Contributor
Having difficulty with JSON View which only shows 30 records but view configured to show 100
New to SharePoint admin/development so please bear with me. SharePoint Online I am trying to apply a formatting view to a sharepoint list that normally will only have about 100 items per day...
MoshJohr
Jun 23, 2021Copper Contributor
ManishH did you find a solution for this? Experiencing the same issue here.
MoshJohr
Jun 23, 2021Copper Contributor
MoshJohr Nevermind I found a solution myself. You have to create a new view but as gallery view. Then you can put your JSON in there with some adjustments and it should work well even with more than 30 items.
- jsmileybJul 07, 2022Copper ContributorWhat adjustments did you make? I'm following what you did...more items do show; however, my styling is completely ignored.
- ManishHJul 08, 2022Copper Contributor
Sorry didn't realise there were replies to this post recently.
I've been using it like this now:
with this JSON and it is working perfectly fine. This is a blast from the past!!
{ "$schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json", "hideSelection": true, "hideColumnHeader": true, "rowFormatter": { "elmType": "div", "style": { "display": "flex", "flex-wrap": "wrap", "align-items": "stretch", "flex-direction": "row", "padding": "20px", "margin-bottom": "16px", "max-width": "300px", "max-height": "120px", "border-radius": "8px" }, "attributes": { "class": "ms-bgColor-neutralLighter" }, "children": [ { "elmType": "div", "_comment_": "DIV ONE", "style": { "flex-grow": "1", "display": "flex", "flex-direction": "column", "flex-wrap": "wrap", "align-items": "stretch", "max-width": "50px" }, "children": [ { "elmType": "img", "style": { "display": "block", "height": "auto", "margin-top": "10px", "min-height": "60px", "max-height": "60px", "border-radius": "50%" }, "attributes": { "src": "='/_layouts/15/userphoto.aspx?size=M&accountname=' + [$Person.email]" } } ] }, { "elmType": "div", "style": { "text-align": "center", "padding": "5px", "margin": "auto" }, "children": [ { "elmType": "div", "style": { "font-weight": "500", "font-size": "0.9rem" }, "txtContent": "[$Title]" }, { "elmType": "div", "style": { "font-weight": "500", "font-size": "0.7em", "overflow": "hidden", "max-width": "280px", "white-space": "wrap" }, "txtContent": "[$JobTitle]" }, { "elmType": "div", "txtContent": "[$OfficePhoneNumber]" }, { "elmType": "div", "txtContent": "[$MobilePhoneNumber]" }, { "elmType": "span", "style": { "height": "2rem", "width": "2rem", "font-size": "2em", "cursor": "pointer", "margin": "0px 5px", "vertical-align": "text-bottom", "display": "=if([$Person.email]=='','none','')" }, "children": [ { "elmType": "a", "style": { "cursor": "pointer", "color": "purple" }, "attributes": { "class": "ms-bgColor-neutralLighterAlt ms-bgColor-neutralLight--hover ms-fontColor-themePrimary--hover", "iconName": "TeamsLogo", "href": "='https://teams.microsoft.com/l/chat/0/0?users=' + [$Person.email]", "title": "Teams" } }, { "elmType": "span", "style": { "display": "row", "margin": "0px 2px" } }, { "elmType": "a", "style": { "cursor": "pointer", "color": "darkblue" }, "attributes": { "class": "ms-bgColor-neutralLighterAlt ms-bgColor-neutralLight--hover ms-fontColor-themePrimary--hover", "iconName": "OutlookLogo", "href": "='mailto:' + [$Person.email]", "title": "Email" } } ] } ] } ] } }