Die SharePoint Commandbar anpassen
Die SharePoint Commandbar lässt sich pro Ansicht (View) mit Json anpassen. Elemente lassen sich verschieben, verstecken und es ist noch vieles mehr möglich!
Man könnte zum Beispiel "Rasteransicht bearbeiten" auf den "Neu" Button legen. Automatisieren und Integrieren kann man aus der SharePoint Commandbar einfach ausblenden, und es ist noch viel mehr möglich.
Eigentlich geht das ganz einfach:
- in den Ansichten findet man den Punkt "Aktuelle Ansicht formatieren":
- In dem jetzt geöffneten Jason Editor die gewünschten Änderungen durchführen und speichern(Achtung: die Anpassung gilt nur für diese eine Ansicht!)
In diesem Beispiel machen wir folgendes (von oben nach unten)
- "New" Button ausblenden
- "Grid View" als Button anzeigen - in der Primary Anzeige (nicht dem Overflow [...])
- "Teilen" - Icon entfernen
- "nach Excel Exportieren" verschieben wir von "Primary" in den Overflow (die Pünktchen)
JSON aus dem Beispiel oben:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",
"commandBarProps": {
"commands": [
{
"key": "new",
"hide": true
},
{
"key": "editInGridView",
"text": "Quick edit",
"iconName": "EditTable",
"primary": true
},
{
"key": "share",
"iconName": "",
"title": "Share this List"
},
{
"key": "export",
"sectionType": "Overflow",
"position": 3
}
]
}
}
Microsoft Dokumentation der Command-Bar Properties:
Command bar customization syntax reference | Microsoft Docs
Command bar customization syntax reference | Microsoft Docs
Command Bar Formatting Beispiele:
List-Formatting/view-samples/commandbar-hide-automate at master · pnp/List-Formatting · GitHub
List-Formatting/view-samples/commandbar-hide-automate at master · pnp/List-Formatting · GitHub
Command Bar Properties
"commandBarProps" : { | |
"commands": [ | |
new | {"key":"new","hide":true}, |
newFolder | {"key":"newFolder","hide":true}, |
newWordDocument | {"key":"newWordDocument","hide":true}, |
newExcelWorkbook | {"key":"newExcelWorkbook","hide":true}, |
newPowerPointPresentation | {"key":"newPowerPointPresentation","hide":true}, |
newOneNoteNotebook | {"key":"newOneNoteNotebook","hide":true}, |
newFormsForExcel | {"key":"newFormsForExcel","hide":true}, |
newVisioDrawing | {"key":"newVisioDrawing","hide":true}, |
upload | {"key":"upload","hide":true}, |
uploadFile | {"key":"uploadFile","hide":true}, |
uploadFolder | {"key":"uploadFolder","hide":true}, |
open | {"key":"open","hide":true}, |
share | {"key":"share","hide":true}, |
copyLink | {"key":"copyLink","hide":true}, |
download | {"key":"download","hide":true}, |
rename | {"key":"rename","hide":true}, |
copyTo | {"key":"copyTo","hide":true}, |
moveTo | {"key":"moveTo","hide":true}, |
delete | {"key":"delete","hide":true}, |
edit | {"key":"edit","hide":true}, |
comment | {"key":"comment","hide":true}, |
editNewMenu | {"key":"editNewMenu","hide":true}, |
powerBI | {"key":"powerBI","hide":true}, |
powerBIVisualizeList | {"key":"powerBIVisualizeList","hide":true}, |
automate | {"key":"automate","hide":true}, |
automateCreateRule | {"key":"automateCreateRule","hide":true}, |
automateManageRules | {"key":"automateManageRules","hide":true}, |
powerAutomate | {"key":"powerAutomate","hide":true}, |
powerAutomateCreateFlow | {"key":"powerAutomateCreateFlow","hide":true}, |
powerAutomateSeeFlows | {"key":"powerAutomateSeeFlows","hide":true}, |
powerAutomateConfigureFlows | {"key":"powerAutomateConfigureFlows","hide":true}, |
aiBuilderCreate | {"key":"aiBuilderCreate","hide":true}, |
aiBuilderGoto | {"key":"aiBuilderGoto","hide":true}, |
aiBuilder | {"key":"aiBuilder","hide":true}, |
alertMe | {"key":"alertMe","hide":true}, |
newLink | {"key":"newLink","hide":true}, |
integrate | {"key":"integrate","hide":true}, |
manageAlert | {"key":"manageAlert","hide":true}, |
powerApps | {"key":"powerApps","hide":true}, |
powerAppsCreateApp | {"key":"powerAppsCreateApp","hide":true}, |
powerAppsSeeAllApps | {"key":"powerAppsSeeAllApps","hide":true}, |
powerAppsCustomizeForms | {"key":"powerAppsCustomizeForms","hide":true}, |
viewDocumentUnderstandingModels | {"key":"viewDocumentUnderstandingModels","hide":true}, |
versionHistory | {"key":"versionHistory","hide":true}, |
openInImmersiveReader | {"key":"openInImmersiveReader","hide":true}, |
classifyAndExtract | {"key":"classifyAndExtract","hide":true}, |
checkOut | {"key":"checkOut","hide":true}, |
checkIn | {"key":"checkIn","hide":true}, |
undoCheckOut | {"key":"undoCheckOut","hide":true}, |
properties | {"key":"properties","hide":true}, |
pinItem | {"key":"pinItem","hide":true}, |
exportExcel | {"key":"exportExcel","hide":true}, |
exportCSV | {"key":"exportCSV","hide":true}, |
export | {"key":"export","hide":true}, |
editInGridView | {"key":"editInGridView","hide":true}, |
sync | {"key":"sync","hide":true}, |
uploadTemplate | {"key":"uploadTemplate","hide":true}, |
addTemplate | {"key":"addTemplate","hide":true}, |
openInOfficeOnline | {"key":"openInOfficeOnline","hide":true}, |
openInOfficeClient | {"key":"openInOfficeClient","hide":true}, |
addShortcut | {"key":"addShortcut","hide":true}, |
pinToQuickAccess | {"key":"pinToQuickAccess","hide":true}, |
unpinFromQuickAccess | {"key":"unpinFromQuickAccess","hide":true}, |
]}, |
Kommentare