Forum Discussion

AnuragSaini's avatar
AnuragSaini
Copper Contributor
Jun 15, 2020
Solved

How to put "Edit all" item link in Library view.

Hello Experts, Can we put some link in a library view instead of these below steps.   click the ellipsis (...) for an item in the list, select more, and then click Properties to edit the item. or ...
  • RobElliott's avatar
    RobElliott
    Jun 15, 2020

    AnuragSaini I agree that the Edit Properties menu link is not in a useful or intuitive place. So I've prepared some JSON code which will allow you to have a button for each item in your library to open the Edit Properties panel for each document:

     

    On your view of the library, click on Format this view and paste the following JSON into the advanced window.

     

     

    {
      "$schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json",
      "hideSelection": true,
      "hideColumnHeader": true,
      "rowFormatter": {
        "elmType": "div",
        "style": {
          "flex": "0 0 170px",
          "display": "inline"
        },
        "children": [
          {
            "elmType": "button",
            "customRowAction": {
              "action": "editProps"
            },
            "txtContent": "Edit Properties",
            "attributes": {
              "class": "sp-row-button ms-bgColor-neutralLighter ms-fontWeight-semibold"
            },
            "style": {
              "background-color": "#e3e7e7",
              "width": "135px",
              "height": "32px",
              "margin": "10px 0"
            }
          },
          {
            "elmType": "button",
            "attributes": {
              "class": "ms-fontSize-l"
            },
            "style": {
              "border": "None",
              "color": "#0077ff",
              "background-color": "transparent",
              "cursor": "pointer"
            },
            "txtContent": "[$FileLeafRef]",
            "customRowAction": {
              "action": "defaultClick"
            }
          }
        ]
      }
    }

     

     

    Rob
    Los Gallardos
    Microsoft Power Automate Community Super User

Resources