json
85 TopicsHow do I handle lookups with multi value?
For modern ui json column styling what's the way for styling a multi value lookup? At the moment this just outputs the lookup as one value separated by semicolons. Any insight would be great so that each lookup item can be linked. I need this to be able to fix the current broken link in the lookup (btw where do I submit bug reports for sharepoint online?) { "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json", "elmType": "div", "style": { }, "children": [ { "elmType": "a", "txtContent": "@currentField.lookupValue", "attributes": { "href": { "operator": "+", "operands": [ "/url/DisplayForm.aspx?ID=", "@currentField.lookupId" ] }, "target": "_blank" } } ] }1KViews2likes0CommentsLookup values invisible on QuickEdit (JSON formatted)
Hi there, I hope you can help. Values on a Choice column appear colour formatted on QuickEdit view. However values in a Lookup column (values taken from a lookup list) are invisible on QuickEdit. The values are there, but are only visible when you click into the cell. Both Choice & Lookup columns have the same formatting. The screenshot below shows how the columns display in regular list view versus QuickEdit view. Attached is the JSON formatting code I have. Can anyone help please? Thanks.1.4KViews2likes1CommentDownload button in View formatting JSON
Hi, Im create a view in a document library to give an overview of the files with a description. On that view I would like a download button, to download the files directly. On known file formats link JPG i just opens the file and on unknown formats link EPS it dowloads the file. The code looks like this: "elmType": "button", "style": { "background-color": "#6eb556", "color": "white", "font-weight": "bold", "font-size": "1rem", "float": "right", "margin-right": "150px" }, "customRowAction": { "action": "Download" }, "txtContent": "Download", "attributes": { "class": "sp-row-button" Is there a way to force it always to download the file?7.5KViews1like2CommentsTwo JSON questions regarding formatting a Tile View for a SharePoint list
I have a SharePoint list that I have formatted to display in a tile view and because of my lack of knowledge of JSON structure and how it works, I'm not sure how or where to add what I need to bold the column headers and to put a border around each tile. My tiles are very simple and have just three columns I want displayed. I know how to change the sp-card info for the class to get a bolder look but it's bolding the entire column (title AND contents). And there's a soft grey border around each tile and I would like to change the color and bold that as well if possible? Here's what I currently have: { "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/tile-formatting.schema.json", "height": 413, "width": 254, "hideSelection": false, "fillHorizontally": true, "formatter": { "elmType": "div", "attributes": { "class": "sp-card-container" }, "children": [ { "elmType": "div", "attributes": { "class": "sp-card-defaultClickButton" }, "customRowAction": { "action": "defaultClick" } }, { "elmType": "div", "attributes": { "class": "ms-bgColor-white sp-css-borderColor-neutralLight sp-card-borderHighlight sp-card-subContainer" }, "children": [ { "elmType": "div", "attributes": { "class": "sp-card-displayColumnContainer" }, "children": [ { "elmType": "p", "attributes": { "class": "ms-fontColor-neutralPrimary sp-card-label sp-card-highlightedContent" }, "txtContent": "[!Nominees.DisplayName]", "style": { "white-space": "normal", "word-break": "break-word", "font-size": "13px" } }, { "elmType": "p", "attributes": { "title": "[$Nominees]", "class": "ms-fontColor-neutralPrimary sp-card-content sp-card-highlightedContent sp-card-multiline", "role": "heading", "aria-level": "3" }, "txtContent": "=if ([$Nominees] == '', '–', [$Nominees])", "style": { "-webkit-line-clamp": "2", "white-space": "normal", "word-break": "break-word", "font-size": "13px", "height": "30px" } } ] }, { "elmType": "div", "attributes": { "class": "sp-card-displayColumnContainer" }, "children": [ { "elmType": "p", "attributes": { "class": "ms-fontColor-neutralSecondary sp-card-label" }, "txtContent": "[!Why_x0020_have_x0020_they_x0020_.DisplayName]" }, { "elmType": "p", "attributes": { "title": "[$Why_x0020_have_x0020_they_x0020_]", "class": "ms-fontColor-neutralPrimary sp-card-content sp-card-multiline" }, "txtContent": "=if ([$Why_x0020_have_x0020_they_x0020_] == '', '–', [$Why_x0020_have_x0020_they_x0020_])", "style": { "-webkit-line-clamp": "2", "white-space": "normal", "word-break": "break-word", "font-size": "13px", "height": "250px" } } ] }, { "elmType": "div", "attributes": { "class": "sp-card-lastTextColumnContainer" }, "children": [ { "elmType": "p", "attributes": { "class": "ms-fontColor-neutralSecondary sp-card-label" }, "txtContent": "[!Nominator.DisplayName]" }, { "elmType": "p", "attributes": { "title": "[$Nominator]", "class": "ms-fontColor-neutralPrimary sp-card-content " }, "txtContent": "=if ([$Nominator] == '', '–', [$Nominator])" } ] } ] } ] } } And here's what it looks like: Any help is greatly appreciated!3.4KViews1like2CommentsCustom number format with leading letters and numbers
Hi, I'm tying to create a SharePoint Online List as an incident register. I'm want to have an Incident ID column formatted to display the number like such: INC001, INC002 INC003 and so on. I can format the number column to have the leading INC but it drops off the leading 0s. I googled some code to format the number with the leading 0s but then it drops off the INC. "{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "txtContent": "=padStart(toString(@currentField),3,'0')" }" How do I change the code so I can have the leading lettering (INC) and leading 0s so my number column displayed as previously described. Thanks in advanceSolved3KViews1like3Comments