Forum Discussion
Sharepoint launch flow whilst in document library web part
- Oct 24, 2023
Hi Sam -it's a limitation that it won't run via the button as a doc library web part. However, I just tested in my dev environment by using the Embed web part instead and adding the URL of the library. Worked like gold!
Hi Sam -it's a limitation that it won't run via the button as a doc library web part. However, I just tested in my dev environment by using the Embed web part instead and adding the URL of the library. Worked like gold!
Thank youKelly_Edinger
Yes, that has worked as a workaround, not perfect. Don't suppose there is anyway to hide the command bar or see all button when using embed web part?
- Oct 26, 2023
From all the documentation I've found, it's not possible to hide the entire command bar, however you can hide menu items in the command bar. I followed this video (https://www.youtube.com/watch?v=sZYZnJGQgcI) and syntax reference (https://learn.microsoft.com/en-us/sharepoint/dev/declarative-customization/view-commandbar-formatting) to hide most items on the command bar for the initial view, and then hid 'pin' and 'rename' from the command bar once a document was selected. I created a separate view and used that URL for the embed web part so I could still access the entire menu in the standard all items view.
This is what my JSON looks like:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",
"additionalRowClass": {
"operator": ":",
"operands": [
{
"operator": "==",
"operands": [
{
"operator": "%",
"operands": [
"@rowIndex",
2
]
},
0
]
},
"sp-css-backgroundColor-BgLightGray30",
{
"operator": ":",
"operands": [
{
"operator": "==",
"operands": [
{
"operator": "%",
"operands": [
"@rowIndex",
2
]
},
1
]
},
"sp-css-backgroundColor-noFill",
""
]
}
]
},
"commandBarProps": {
"commands": [
{
"key": "new",
"hide": true
},
{
"key": "upload",
"hide": true
},
{
"key": "editInGridView",
"hide": true
},
{
"key": "sync",
"hide": true
},
{
"key": "upload",
"hide": true
},
{
"key": "export",
"hide": true
},
{
"key": "automate",
"hide": true
},
{
"key": "integrate",
"hide": true
},
{
"key": "pinToQuickAccess",
"hide": true
},
{
"key": "addShortcut",
"hide": true
},
{
"key": "alertMe",
"hide": true
},
{
"key": "manageAlert",
"hide": true
},
{
"key": "pinItem",
"hide":true
},
{
"key": "rename",
"hide":true
}
]
}
}
I hope that helps a bit.- Sam_GreenOct 29, 2023Copper ContributorMany thanks Kelly_Edinger this was a great help.