4 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

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
3 votes
Accepted

How to add an image to a column based on the value of another column (and have it show correctly in Gallery view)?

As you are showing the image dynamically using JSON in column formatting, it is working fine in list view. But, JSON formatting only displays the value/image in list view >> It does not store ...
Ganesh Sanap - MVP's user avatar
3 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
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
Accepted

Change the width of a card in Gallery view of a List

Yes, you can do that using JSON view formatting. Follow below steps: Go to your SharePoint list Click on switch view options dropdown at the top & select Format current view. Make sure Format ...
Ganesh Sanap - MVP's user avatar
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

(SP List) How to wrap a text in the format view?

You can use "white-space": "break-spaces" to wrap the text. Try using JSON like: { "$schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting....
Ganesh Sanap - MVP's user avatar
2 votes

Yes/No field in JSON view formatting

I followed the same steps to create two Yes/No columns, one from modern view (named FromView) and another from list settings page(named FromSettings). Tried below combinations and it is working fine ...
Ganesh Sanap - MVP's user avatar
2 votes
Accepted

SharePoint JSON tileProps breaks formatting

This view formatting only works in the Tiles view. The format expects the Title field The format expects a text column with an internal name of Feedback The format expects a person column with an ...
LZ_MSFT's user avatar
  • 6,209
2 votes

Is it possible to add JSON code to hide and show other rows based on column value?

You can create links to your view with filter query strings. Here's an example of how to do that with a multi-choice field: { "elmType": "a", "txtContent": "=...
theChrisKent's user avatar
  • 5,971
2 votes
Accepted

JSON SharePoint list view - background-image doest not work

This is expected behavior. Currently style properties cannot have any of the following characters: (, :, &, ;, !. If you will add "debugMode": "true" to your JSON code, you can ...
Ganesh Sanap - MVP's user avatar
2 votes
Accepted

Using JSON to change the color of a row based on the date it was Modified

Use below JSON in Format current view: { "schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json", "additionalRowClass": "=if([$...
Ganesh Sanap - MVP's user avatar
2 votes
Accepted

SharePoint online custom list formatting - only Transform or writing-mode css ignored

This seems like a limitation of JSON formatting in SharePoint. Currently, the following style attributes are allowed: 'background-color' 'fill' 'background-image' 'border' 'border-bottom' 'border-...
Ganesh Sanap - MVP's user avatar
2 votes

SharePoint Online View Formatting: Multiple If Statements Problem

If function has syntax like: if(condition, true_value_statement, false_value_statement) You are missing a false_value_statement for last if block in your formula. So, try using this formula with ...
Ganesh Sanap - MVP's user avatar
2 votes
Accepted

List formatting, column not loaded

On top of Ganesh's input, There is work around where you can still use column value in Column Formatting even if you don't add it as View Columns. You can use Summary column either in View Filter ...
Kalpesh Vaghela's user avatar
1 vote
Accepted

SharePoint Online list - remove column name from grouped view

For grouping on lookup columns, use following JSON in view formatting: { "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json", "...
Ganesh Sanap - MVP's user avatar
1 vote

Row formatting based on a LOOKUP column value in modern SharePoint List

Please follow the steps: 1.In my test, this is the [NumberColumn] field and the [LookUpColumn] field 2.Go to your ListA, click All Items >> Format current view 3.On the Format View windows, ...
EchoDu_MSFT's user avatar
  • 2,827
1 vote
Accepted

Row formatting based on a LOOKUP column value in modern SharePoint List

You have to use view formatting to customize entire row in a SharePoint list. If you want to just apply the colors to entire row, you should use additionalRowClass property to format the view. ...
Ganesh Sanap - MVP's user avatar
1 vote

Modern lists - Row hover style

You can do this by using a slightly different set of classes. Instead of the sp-css-backgroundColor-* classes you can use the ms-bgColor-* Fluent UI classes. The colors aren't exactly the same, but ...
theChrisKent's user avatar
  • 5,971
1 vote

How to color new list record like outlook do?

If you are using SharePoint online, you can use JSON formatting to customize how fields/list views in SharePoint lists are displayed. For more information check below documentations: Use column ...
Ganesh Sanap - MVP's user avatar
1 vote
Accepted

Format List View: JSON background colours 'ms-bgColor2' property - very few colours available

You can find all available classes at: Reusable SharePoint Online Classes for Modern UI Also, you can apply background color using style property, like: "elmType": "div", "...
Ganesh Sanap - MVP's user avatar
1 vote
Accepted

Doc lib view formatting: accessing filetype icons

You can create a img control to show the file type icon using JSON formatting. You need to set the src property of img element based on [$File_x0020_Type]. In SharePoint online, default icon URLs are ...
Ganesh Sanap - MVP's user avatar
1 vote
Accepted

IF-condition on a Yes/No column value

Use this: "txtContent": "=if([$isOwner], 'Captain', 'Crew')" Output:
Ganesh Sanap - MVP's user avatar
1 vote
Accepted

Changing the Color of a Row in a SharePoint List (using JSON) based on a columns value

Try something like below: { "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json", "additionalRowClass": "=if([$Modified] &...
Ganesh Sanap - MVP's user avatar
1 vote

Dynamic filtering with Gallery list view in SharePoint Online

Try changing hideSelection to true like: "hideSelection": true, Note: Specifies whether the ability to select rows in the view is disabled or not. false is the default behavior inside a ...
Ganesh Sanap - MVP's user avatar
1 vote
Accepted

Formatting list row based on score column Office365

You can change the background-color based on value of [$Score] like below: "background-color": "=if([$Score] < 25, 'red', if([$Score] > 25 && [$Score] < 50, 'blue', if([...
Ganesh Sanap - MVP's user avatar
1 vote

JSON view formatting [$Editor] en [$Modified] not visible

You could try to use:[$Editor.title] to show the editor name.
Amos's user avatar
  • 1,981
1 vote
Accepted

Access information in hidden columns with JSON formatting

This is a known behavior in SharePoint. In order to format a column or view using JSON, the column you are referencing in JSON code must be included in the list view. According to official ...
Ganesh Sanap - MVP's user avatar
1 vote

List/view formatting on grouped view on modern SharePoint page

As far as I know, json formatting can not achieve your requirements. You could try to use spfx to create Hillbilly tabs web part. I find this Modern Hillbilly tabs web part in GitHub, hope that will ...
Michael Han's user avatar
  • 5,181

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