Oct 23 2023 06:30 PM
Hi
I have a SharePoint document library with a button that launches a flow. This works with no problems when viewed directly from the document library.
My site has various pages where the document library is viewed via the document library web part. When the button to lunch the flow is clicked whilst viewing via the document library web part, the flow will not start - nothing happens.
Is it possible to get flows to work when a user views the document library via the document library web part?
Any help would be much appreciated. Thank you.
Oct 23 2023 07:45 PM - edited Oct 23 2023 07:46 PM
SolutionHi 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!
Oct 23 2023 08:31 PM
Thank you@Kelly_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 08:30 AM - edited Oct 26 2023 08:37 AM
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-formattin...) 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.
Oct 29 2023 02:59 PM
Nov 02 2023 02:05 PM