Forum Discussion
How to put "Edit all" item link in Library view.
- 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
AnuragSaini you can bulk edit custom columns in your library although not the default columns:
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.
- RobElliottJun 15, 2020Silver Contributor
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- AnuragSainiJun 15, 2020Copper Contributor
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.
- AnuragSainiJun 16, 2020Copper Contributor
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%22,
"elmType": "button","customRowAction": {
"action": "editProps"
},
"txtContent": "Edit Properties",
"attributes": {
"class": "sp-row-button ms-bgColor-neutralLighter ms-fontWeight-semibold"
}
}