Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs
14 votes
Accepted

JSON Column formatting - Joining values

Yep, your alternative to an inline expression is this for concatenating values: { "elmType": "div", "txtContent": { "operator": "+", "operands": [ "[$Duration]", " ", "[$...
James Love's user avatar
  • 25.5k
6 votes
Accepted

What limitations should I keep in mind when choosing between single line of text or choice columns?

You are correct that you can't use a choice field in a lookup (but you can reference a choice field in a calculated column which can be used in lookups). However, there are some gotchas when it comes ...
theChrisKent's user avatar
  • 6,001
5 votes

How to add a link to list item in a JSON view format?

You could use $ID. Sample demo: { "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json", "elmType": "a", "txtContent": "@currentField", "attributes": { ...
Lee's user avatar
  • 4,271
5 votes

what can you do with Format View

Adding to what Lukas has mentioned . Long story short, just look at the snip below (Taken from the Microsoft official description) for complete view of what Formatting can do.
Yash Kamdar's user avatar
  • 1,118
5 votes

Format view using @group.fieldData on a lookup column

Try using below JSON code: { "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json", "groupProps": { "hideFooter&...
Ganesh Sanap - MVP's user avatar
5 votes

Custom view rowformatter - how to make a hyperlink look like a button

Use JSON like below to create hyperlink with button: { "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "...
Ganesh Sanap - MVP's user avatar
4 votes
Accepted

How to utilize if/else condition for JSON column formatting in SharePoint?

You can do it similar to that in Excel :) You can checkout the below sample to get an idea: "background-color": "= if([$OtherColumn] == 'Red', 'red', if([$OtherColumn] == 'Green', 'green', if([$...
Gautam Sheth's user avatar
  • 30.9k
4 votes

How to add a link to list item in a JSON view format?

There is another option that is to just use the defaultClick action: { "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json", "elmType&...
Alberto S.'s user avatar
4 votes
Accepted

In a Sharepoint List: Display an Image (field type "Hyperlink or Picture")

You almost got it. Set src attribute directly. src is just URL to an image, so why to use description at all. If you look at the rendered HTML code using Developer dashboard (F12) you will find that ...
Lukas Nespor's user avatar
  • 1,661
4 votes
Accepted

what can you do with Format View

Improve the display of views in SharePoint lists with formatting. The view-formatting text describes the elements that are displayed and their display style. The data in the list doesn't change. In ...
Lukas Nespor's user avatar
  • 1,661
4 votes
Accepted

How to display Persona Card on hover in list using Sharepoint Online view formatting?

Use the defaultHoverField property in JSON as described here: Use column formatting to customize SharePoint
user90476's user avatar
4 votes
Accepted

Can we render element based on the current field value in Column Formatting?

Try using below JSON: { "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "style":...
Ganesh Sanap - MVP's user avatar
4 votes
Accepted

SharePoint Online list - format group headers to remove column name

Use below JSON to format list view: { "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json", "groupProps": { "...
Ganesh Sanap - MVP's user avatar
4 votes
Accepted

Lists: Circle progress bar as column view

Yes, it is possible using JSON column formatting capabilities. Check this sample available in GitHub list formatting samples repository: Doughnut Chart Additional formatting samples: Number Battery ...
Ganesh Sanap - MVP's user avatar
4 votes
Accepted

How to hide buttons on the item context menu in SharePoint 365 Modern Experience

First of all, you cannot hide individual context menu options using JSON formatting. You can only customize/hide options from command bar at the top. You can hide "Share" option from command ...
Ganesh Sanap - MVP's user avatar
4 votes
Accepted

How can I add a link to list attachments using Json formatting

Unfortunately, the attachments field is not directly accessible in JSON formatting. You can only check if attachments are available or not for the list item using: "txtContent": "=if([$...
Ganesh Sanap - MVP's user avatar
3 votes

Column formatting - AND OR conditions

You've basically got the "Or" idea down. You only need to switch it to "And," except without using &&'s or ||'s. Here's what I mean: I'm going to split this out onto multiple lines so it's ...
Stevish's user avatar
  • 133
3 votes

How to color code a SharePoint list date field based on comparison with todays date?

For Modern UI: Yes, you can use json formatting to conditionally color fields in sharepoint online. The following example colors the current date field red when the value inside an item's ...
Ganesh Sanap - MVP's user avatar
3 votes

what can you do with Format View

Using format view, you can format rendering of your library view. As in Previous version of SharePoint/Classic experience SharePoint developers are using Client side rendering(CSR) option to customize ...
Ganesh Sanap - MVP's user avatar
3 votes
Accepted

Display HTML formatted text from Rich Text multi-line column in SharePoint list column formatted with JSON

Currently, rich multiline text fields are not supported within json column formatting. You could read this article: https://github.com/SharePoint/sp-dev-list-formatting/issues/88 The only workaround ...
Michael Han's user avatar
  • 5,201
3 votes
Accepted

JSON conditional format column based on choice from another column

If the source column allows multiple value selections, SharePoint stores those selections as an array of values inside the field. Therefore, matching on a single string value will never succeed ...
willman's user avatar
  • 3,724
3 votes
Accepted

If statement JSON column formatting - SharePoint Online List

I looks to me like you want the text to be #168DC8 and the background to be white unless the lookupValue is not one of the defined conditions, then you'd like them swapped. Try this format: { "$...
theChrisKent's user avatar
  • 6,001
3 votes
Accepted

Need Help with "Format View" feature in Modern List based on Condition

To do the comparison against the current date, you need to use the @now. Also, you need to calculate a date 5 days back from today. So, you need to subtract 5 days worth of milliseconds, (5 * 24 * 60 *...
Ganesh Sanap - MVP's user avatar
3 votes
Accepted

Change column name in view using json view formatting

If you want to change the column header and keep the list view as a standard SharePoint list view then No. It is not possible to just change the column headers using JSON formatting. If you want to ...
Ganesh Sanap - MVP's user avatar
3 votes
Accepted

Using Json to format a row in a sharepoint list

Try using this: "additionalRowClass": "=if([$Deleted] == 'Deleted', 'sp-field-strikeThrough sp-css-color-red', if([$Modified] < @now && [$Modified] >= @now - 86400000, 'ms-...
Ganesh Sanap - MVP's user avatar
3 votes

Using json to modify lots of different columns in a SharePoint list

There is no way to apply JSON formatting to multiple columns at a time using SharePoint out of the box capabilities. So, you need to use PowerShell and automate this process to apply JSON formatting ...
Ganesh Sanap - MVP's user avatar
3 votes
Accepted

How to detect Edit vs New when styling custom list forms with JSON?

Using Created, ID, or Author in JSON code will not work as those fields are not shown on list forms. You can refer only those columns which are shown on list forms. Also, even if you refer any other ...
Ganesh Sanap - MVP's user avatar
3 votes
Accepted

Can ID column be displayed when configuring a list form header using JSON?

As per the current design, you can refer only those columns which are shown on list forms in your JSON. Similar thread: How to detect Edit vs New when styling custom list forms with JSON? As Chris ...
Ganesh Sanap - MVP's user avatar
3 votes
Accepted

How to increase font size of displayname titles when it comes to JSON formating?

Unfortunately, there are no formatting options available for the form body. The only options are the sections, their names, and the fields for each as you've already got.
theChrisKent's user avatar
  • 6,001
3 votes
Accepted

SPO: Using JSON to Show/Hide Modern Form Field Based on Value Selected in Lookup Column

After debugging, I found that the validation function receives the lookup field values in this format: <Lookup ID>;#<Lookup Title>: In your case, if the Hourly item has an id of 1, then ...
Denis Molodtsov's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible