Instead of a long link, it is much nicer to display an icon! And only if there is an entry in an element. This makes the SharePoint list clearer and more dynamic.
You can copy this jsonJavaScript Object Notation is abbreviated as JSON. JSON is programming language independent and compact. We use JSON code to format SharePoint online:Show search results mehr erfahren code:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"children": [
{
"elmType": "a",
"attributes": {
"target": "_blank",
"iconName": "Folder",
"class": "sp-field-quickActions",
"href": "=if(@currentField!='',@currentField,''"
},
"style": {
"display": "=if(@currentField!='', 'block','none !important')",
"padding-left": "40px"
}
}
]
}
You can select the icon (“iconName”) from the fabric icons
Dieser Beitrag ist auch verfügbar auf:
Deutsch (German)