Forum Discussion
badamsSP
Mar 20, 2020Copper Contributor
SharePoint List - Custom JSON Column Formatting - Office UI Fabric Icon for Any Selected Value?
Hi all - first post of hopefully not too many! I manage a number of SharePoint lists and am familar with using basic JSON formatting to display custom colours and icons from the Office UI Fabr...
RobElliott
Mar 20, 2020Silver Contributor
Hi badamsSP, you can use the following JSON to format your column so that each item shows the same icon, for example the MapPin:
{ "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json", "elmType": "div", "attributes": { "class": "sp-field-severity--good" }, "children": [ { "elmType": "span", "style": { "display": "inline-block", "padding": "12px 4px" }, "attributes": { "iconName": "MapPin" } }, { "elmType": "span", "txtContent": "@currentField" } ] }
Rob
Los Gallardos
Microsoft Power Automate Community Super User