Json code for use in a List Column to alert user on Date met conditions

Chris C 0 Reputation points
2023-06-08T07:22:23.0066667+00:00

I am looking to put either a column formulae or relevant JSon code to conditionally format a calculated column [&DueStatus] using the following logic;

  1. IF [&DueDate] date is equal to OR less than 30 days from Today's Date then alert to be 'DUE SOON" displayed in Yellow Text
  2. IF [&DueDate] date is equal to OR less than 31 days from Today's Date then alert to be "OVERDUE" displayed in Red Text
  3. IF [&DueDate] date is equal more than 30 days from Today's Date then alert to be "NO ACTION REQ"displayed in Green Text

Can anyone assist me?

Microsoft 365
Microsoft 365
Formerly Office 365, is a line of subscription services offered by Microsoft which adds to and includes the Microsoft Office product line.
5,770 questions
Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
10,894 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
11,229 questions
Office Mac
Office Mac
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Mac: A family of Apple personal computers that run the macOS operating system.
545 questions
SharePoint Workflow
SharePoint Workflow
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Workflow: An orchestrated and repeatable pattern of business activity, enabling data transformation, service provision, and information retrieval.
703 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Ling Zhou_MSFT 23,610 Reputation points Microsoft External Staff
    2023-06-09T01:16:06.51+00:00

    Hi @Chris C,

    Apologies for the late reply!

    It is possible to create a calculated column that will calculate the day between today and Due Date.

    User's image

    Here is the reference about why we can't create a calculated column in your condition:

    Any solution to the Today Calculated Column problem is SharePoint?

    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link. 

    The Truth about using [Today] in SharePoint Calculated Columns

    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link. 


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    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.


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.