0

I am trying to use below JSON formatting to create a title view of the document library in my modern SharePoint document library.

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/tile-formatting.schema.json",
  "layout": "Grid",
  "gridSettings": {
    "rows": 2,
    "columns": 4
  },
  "templateSettings": {
    "canvasPadding": 10,
    "itemVerticalPadding": 10,
    "itemHorizontalPadding": 10
  },
  "fields": [
    {
      "elmType": "img",
      "style": {
        "width": 40,
        "height": 40,
        "marginRight": 10
      },
      "attributes": {
        "src": "=getItemImageUrl([FileRef], 30)"
      }
    },
    {
      "elmType": "div",
      "txtContent": "[DetailedDescription]",
      "style": {
        "fontWeight": "bold",
        "fontSize": 16
      }
    }
  ]
}

But, after pasting the above JSON and trying to save, I don't see any change in the view.

Kindly, help me on this.

4
  • From where you got this JSON? Did you copy paste it from ChatGPT or any other similar platform? What are the exact requirements you want to achieve using view formatting? Feb 9 at 4:58
  • I got it using the bard.google.com I want to create a tile view where each element will have an image, Title, description. Clicking on the image will open the respective document I tried applying the JSON but it is not working. Feb 9 at 6:09
  • Try steps given in my answer below and let me know if it works for you. Feb 9 at 6:38
  • Did you try below steps? Is it working for you? Feb 9 at 10:35

1 Answer 1

0

If you want to create a tile/gallery view for your SharePoint online document library, follow below steps:

  1. Go to your SharePoint document library

  2. Click on "Switch view options" drop down from top right corner and select "Tiles":

    enter image description here

  3. If you want to change the fields shown on the card, again click "Switch view options" drop down from top right corner and select "Format current view".

  4. Then click "Edit card":

    enter image description here

  5. Then you can select the fields you want to show on the card as per your requirements and click "Save":

    enter image description here

  6. It should show you the documents in tile/card view with document thumbnail and the selected details.

  7. If you want to save the "Tiles" view as default view for your document library, again click "Switch view options" drop down from top right corner and select "Save view as":

    enter image description here

  8. Do not change anything on the pop up and click "Save":

    enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.