13 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
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,113
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
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

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

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

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 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

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,181
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

JSON column formatting hover styling

I've been asking for hover styles for a long time. Unfortunately, as Michael Han_MSFT wrote in his answer the best you can get is the --hover classes. Fortunately, you can get creative with them to ...
theChrisKent's user avatar
  • 6,001
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 hide column if no choices are selected

Conditional formulas in SharePoint online modern experience does not support Multiple choice column. Reference: Supported column types in conditional show or hide
Ganesh Sanap - MVP's user avatar
3 votes

How to display past list items related to a column value?

In order to display a custom hover card, you need to use customCardProps element. See more details here. It has the following properties: openOnEvent hover - card appears on mouse hover; click - card ...
Denis Molodtsov's user avatar
3 votes
Accepted

Conditional formatting of a field on a sharepoint list by month of a date

Use either of below JSON codes on your date column as per your requirements: Based on Month only: { "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting....
Ganesh Sanap - MVP's user avatar
3 votes
Accepted

Trigger flow with icon instead of button?

You will require button element to use action and actionParams. However, you can add children elements to button element to add icon & text (if required). Example: { "$schema": "...
Ganesh Sanap - MVP's user avatar
3 votes
Accepted

Data Bar Color Change

You can use JSON like below to conditionally change the color of data bars: { "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json", "...
Ganesh Sanap - MVP's user avatar
3 votes

How to create a progress bar that updates on status change

You can use SharePoint JSON column formatting for this. Example: { "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType&...
Ganesh Sanap - MVP's user avatar
2 votes
Accepted

Column Formatting Option not available

You cannot use column formatting using JSON in SharePoint 2013. Column formatting using JSON is available for SharePoint Online, SharePoint Server 2019, and SharePoint Online Small Business only. ...
Ganesh Sanap - MVP's user avatar
2 votes
Accepted

sharepoint column formatting json examples with paging

Column Formatting: If you have formatted your column using JSON formatting, it will support Sorting and Filtering. See below image, "Container Content" column is sorted in descending order and you ...
Ganesh Sanap - MVP's user avatar
2 votes
Accepted

Organize multi-choice user inputs by separate line (not comma)

Try using below JSON code on your choice field: { "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "...
Ganesh Sanap - MVP's user avatar
2 votes
Accepted

Get value of Name column from SPO list for JSON formatting

According to the official documentation, You can use this context([$FieldName]) to reference the values of other fields within the same row by specifying the internal name of the field surrounded by ...
Ganesh Sanap - MVP's user avatar
2 votes
Accepted

How can JSON column formatting be used to highlight duplicate entries in a column a list?

No. In column formatting, you cannot access/use the column values from another list item/row. You can only access the column values from the same list item/row like [$AnotherColumnFromSameRow]. Where ...
Ganesh Sanap - MVP's user avatar
2 votes

JSON Column formatting : retrieve view ID or param in URL

Solution: Create SPFx Field Customizer so you could get the view id by this.context.pageContext.legacyPageContext
Lee's user avatar
  • 4,271
2 votes
Accepted

Insert bold in column formatting

Try this: { "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "debugMode": true, "txtContent": "@currentField", "style": { ...
Ganesh Sanap - MVP's user avatar
2 votes
Accepted

Status calculated column colour code

You can use Column/JSON formatting to achieve this. Use below JSON code to change the color of the text: { "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema....
Ganesh Sanap - MVP's user avatar
2 votes
Accepted

SPO: Create Hyperlink from Calculated Column

Try with this json: { "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "a", "txtContent": "[$InternalNameOfYourNameColumn]", "...
Damjan Tomic's user avatar
  • 3,646
2 votes

SPO: Create Hyperlink from Calculated Column

We can use the JSON formatting below to achieve it. { "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json", "elmType": "div", "style": { "display": "...
LZ_MSFT's user avatar
  • 6,219

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