SOLVED

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

Copper Contributor

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 Select the item in the select and click on Information Panel(I)

 

as I am unable to edit all items in one go I have also tried to select Edit(link to edit item) in my default view but its not showing anything.

 

Any workaround for the same would be much appreciable.

6 Replies

@AnuragSaini you can bulk edit custom columns in your library although not the default columns:

 

bulkEdit.png

 

Rob

Los Gallardos
Microsoft Power Automate Community Super User

Thanks @RobElliott for the quick response. But my requirement is to put edit link per library item. Users don't want to select and click "I" as shown by you. 

best response confirmed by AnuragSaini (Copper Contributor)
Solution

@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:

Edit Properties Button.png

 

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

Thanks @RobElliott for the working JSON. I would say its the best solution provided by you. Just an ask If other columns need to be shown in this view then what changes I need to be done because I need to show the metadata as well like created by, modified, modified by etc.

@RobElliott  Hello Rob I had created a single line of text column and put below JSON into that. I was hit and trial using your JSON and it worked for me as per my expectation. Thanks for the help.

 
{
   "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
   "elmType": "button","customRowAction": {
          "action": "editProps"
        },
        "txtContent": "Edit Properties",
        "attributes": {
          "class": "sp-row-button ms-bgColor-neutralLighter ms-fontWeight-semibold"
        }
}
 
 
 

Edit Property.png

 

@AnuragSaini that's good as I hadn't had a chance to look at it again.

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User

1 best response

Accepted Solutions
best response confirmed by AnuragSaini (Copper Contributor)
Solution

@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:

Edit Properties Button.png

 

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

View solution in original post