Conditional formatting on a list

%3CLINGO-SUB%20id%3D%22lingo-sub-2241455%22%20slang%3D%22en-US%22%3EConditional%20formatting%20on%20a%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2241455%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20all%2C%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3EI've%20got%20a%20SharePoint%20list%20of%20which%20I%20am%20looking%20to%20setup%20on%20conditional%20formatting%20on%20the%20row%20if%20a%20date%20and%20time%20has%20passed%20(i.e%2024%2F03%2F2021%20-%203%3A00pm%2C%20the%20row%20to%20then%20turn%20red%20unless%20an%20additional%20time%20and%20date%20column%20has%20data%20in%20it).%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWould%20anyone%20be%20able%20to%20help%20me%20with%20the%20formatting%20for%20this%3F%3CBR%20%2F%3E%3CBR%20%2F%3EGreatly%20appreciated!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2241455%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%3CLINGO-SUB%20id%3D%22lingo-sub-2241967%22%20slang%3D%22en-US%22%3ERe%3A%20Conditional%20formatting%20on%20a%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2241967%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1011022%22%20target%3D%22_blank%22%3E%40darrenm88%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20can%20achieve%20this%20by%20setting%26nbsp%3B%3CSTRONG%3EadditionalRowClass%3C%2FSTRONG%3E%20in%20view%20formatting%20JSON.%3C%2FP%3E%3CP%3E%3CSTRONG%3EExample%3C%2FSTRONG%3E%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-json%22%3E%3CCODE%3E%7B%0A%20%20%22%24schema%22%3A%20%22https%3A%2F%2Fdeveloper.microsoft.com%2Fjson-schemas%2Fsp%2Fview-formatting.schema.json%22%2C%0A%20%20%20%22additionalRowClass%22%3A%20%22%3Dif(%5B%24DueDate%5D%20%26lt%3B%3D%20%40now%2C%20'sp-field-severity--severeWarning'%2C%20'')%22%0A%7D%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3ESample%20Output%3A%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22listformatting-additionalrowclass%22%20style%3D%22width%3A%20739px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F267843iDA6BCAB4F85D17C4%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22listformatting-additionalrowclass%22%20alt%3D%22listformatting-additionalrowclass%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20can%20find%20more%20information%20about%20view%20formatting%20at%3A%26nbsp%3B%3CA%20title%3D%22Use%20view%20formatting%20to%20customize%20SharePoint%22%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fdeclarative-customization%2Fview-formatting%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EUse%20view%20formatting%20to%20customize%20SharePoint%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CHR%20%2F%3E%3CP%3EPlease%20click%26nbsp%3B%3CSTRONG%3EMark%20as%20Best%20Response%3C%2FSTRONG%3E%26nbsp%3B%26amp%3B%20%3CSTRONG%3ELike%3C%2FSTRONG%3E%20if%20my%20post%20helped%20you%20to%20solve%20your%20issue.%20This%20will%20help%20others%20to%20find%20the%20correct%20solution%20easily.%20It%20also%20closes%20the%20item.%20If%20the%20post%20was%20useful%20in%20other%20ways%2C%20please%20consider%20giving%20it%20%3CSTRONG%3ELike%3C%2FSTRONG%3E.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Regular Visitor

Hi all,

I've got a SharePoint list of which I am looking to setup on conditional formatting on the row if a date and time has passed (i.e 24/03/2021 - 3:00pm, the row to then turn red unless an additional time and date column has data in it). 

 

Would anyone be able to help me with the formatting for this?

Greatly appreciated!

 

1 Reply

@darrenm88 

 

You can achieve this by setting additionalRowClass in view formatting JSON.

Example:

 

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json",
   "additionalRowClass": "=if([$DueDate] <= @now, 'sp-field-severity--severeWarning', '')"
}

 

Sample Output:

 

listformatting-additionalrowclass

 

You can find more information about view formatting at: Use view formatting to customize SharePoint 


Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.