I do not know JSON, so I am struggling to figure this out. I have a drop down menu column and if the user selects one of the drop down menus (Lets say its called "Peer Review - Rushed") I would like the cell to show red, or even the whole row if need be. How do I do that?

  • Do you need this in only the Modern UI, or both in Classic UI and Modern UI? JSON only works with the Modern UI. – Mike Smith - MCT - MVP Oct 26 '18 at 20:10
  • Mike, I think just modern. – Klj126 Oct 26 '18 at 21:13
  • @MikeSmith-MCT-MVP Just kidding, apparently people are using the classic, am I SOL because of this? – Klj126 Oct 26 '18 at 22:03
  • No, just need a different solution. Classic uses JSLink. If no one else does... I'll try to post an example this weekend. – Mike Smith - MCT - MVP Oct 27 '18 at 2:08

For the Modern UI and JSON:

  "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
  "elmType": "span",
  "debugMode": true,
  "txtContent": "@currentField",
  "style": {
    "color": "=if(@currentField == 'Peer Review - Rushed', 'Red', if(@currentField == 'Peer Review - Slow', 'Blue', 'Black'))"

This will set Red, Blue, or if other Black.

  • Click the column heading's dropdown
  • Click Column Settings.
  • Click Format this column.
  • Copy and paste the JSON and click Save.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.