Change the date colour or change to NA when a certain date is entered in field.

%3CLINGO-SUB%20id%3D%22lingo-sub-2274864%22%20slang%3D%22en-US%22%3EChange%20the%20date%20colour%20or%20change%20to%20NA%20when%20a%20certain%20date%20is%20entered%20in%20field.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2274864%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20a%20list%20to%20monitor%20staff%20training%20and%20when%20the%20training%20is%20due.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EManagers%20enter%20the%20date%20their%20staff%20completes%20the%20training%20and%20it%20colour%20codes%20the%20cells%20based%20on%20when%20the%20training%20is%20completed%2C%20due%20and%20overdue.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20due%20date%20is%2012%20months%20or%2024%20months%20from%20the%20date%20they%20enter%20depending%20on%20the%20course.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20I%20have%20the%20following%20code%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECompleted%20-%20Green%3C%2FP%3E%3CP%3EDue%203%20months%20(90%20days)%20before%20due%20date%20-%20Orange%3C%2FP%3E%3CP%3EN%3CFONT%20face%3D%22inherit%22%3Eo%20date%20or%20not%20completed%2C%20not%20started%20or%20%3C%2FFONT%3EOverdue%3CFONT%20face%3D%22inherit%22%3E-%20Red%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%20face%3D%22inherit%22%3EThis%20works%20well%20and%20tested%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20now%20want%20to%20add%20a%20either%20NA%20or%20change%20the%20text%20colour%20to%20green%20when%20the%20date%2009%2F09%2F2099%20is%20entered%2C%20as%20all%20the%20staff%20do%20not%20need%20that%20particular%20training.%20See%20below.%3C%2FP%3E%3CP%3E%26nbsp%3B%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Date.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F273120i2A818A3861A6570C%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Date.png%22%20alt%3D%22Date.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20managed%20to%20do%20this%20with%20JavaScript%20on%20our%20classic%20SharePoint%20but%20struggling%20to%20convert%20on%20the%20modern%20site.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2274864%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ELists%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Senior Member

Hi,

 

I have a list to monitor staff training and when the training is due.

 

Managers enter the date their staff completes the training and it colour codes the cells based on when the training is completed, due and overdue.

 

The due date is 12 months or 24 months from the date they enter depending on the course.

 

So I have the following code

 

Completed - Green

Due 3 months (90 days) before due date - Orange

No date or not completed, not started or Overdue- Red

This works well and tested

 

I now want to add a either NA and change the text colour to green when the date 09/09/2099 is entered, as all the staff do not need that particular training. See below.

 Date.png

 

I managed to do this with JavaScript on our classic SharePoint but struggling to convert on the modern site.

0 Replies