문제

I want to insert some JSON into my SharePoint list.

Basically I have a Modified column that shows me when a value in a row has last been modified. I would like to have a row turn red if it has been Modified within the last day, and orange if it was been within the last week.

I'm new to JSON and was looking for some help. thanks!

도움이 되었습니까?

해결책

Use below JSON in Format current view:

{
  "schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json",
  "additionalRowClass": "=if([$Modified] < @now && [$Modified] >= @now - 86400000, 'sp-field-severity--blocked', if([$Modified] < @now && [$Modified] >= @now - 604800000, 'sp-field-severity--warning' , ''))"
}

For more information on how to use JSON view formatting follow this:

  1. Formatting list row based on status column Office365
  2. Use view formatting to customize SharePoint

You can use the following predefined classes for several common scenarios:

Predefined classes

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top