Sharepoint Colour Coding for a Calculated Cell

Basma Cassidy 21 Reputation points
2020-12-06T11:01:29.523+00:00

Hi,

I am using SharePoint 2010 and 2013. I have a library with multiple columns. One particular column is titled ‘State’. In this field, the user selects one of the available states. For example they may select either Approved or Cancelled or Rejected. Depending on the selected state, I would like the field to not only have the selected in text but also a particular colour. For example, Approved will display ‘Approved’ and be coloured green.

I’m new to SharePoint and any assistance would be greatly appreciated.

Kind regards,
Bas

SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,422 questions
{count} votes

Accepted answer
  1. Echo Du_MSFT 17,256 Reputation points
    2020-12-07T05:59:54.877+00:00

    Hello @Basma Cassidy ,

    You apply colour formatting to a List based on value in cell using JQuery code.

    Please follow steps:

    1.Go to SharePoint List, create a Choice column.
    45466-choice.png

    2.Click on settings icon under the Upper right corner, and then click on Edit page.
    3.Add the Script Editor web part, and then click on EDIT SNIPPET.
    45564-script-editor.png

    4.Paste in code as shown below then click Insert.

    5.Stop Editing
    45651-list.png

    Thanks,
    Echo Du

    ===================

    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    2 people found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.