Forum Discussion

Filipe Matos's avatar
Filipe Matos
Copper Contributor
Apr 08, 2020
Solved

Conditional formatting list field based on multiple field values

Hi! Can I format a list field using a field extension based on a given logic from multiple fields on a row? Let's assume, I have a list with 3 columns:   Enddate Status Traffic light 1/4/...
  • Swaminathan Sriram's avatar
    Apr 09, 2020

    Hi,

    You can use column formatting to display the background color in your required field [Conditional formatting based on the other field values] as per your requirement. You would need to construct a JSON object that describes the elements that are displayed when your field is included in a list view and their display style.

     

    Please refer to this sample which will be helpful for your current requirement - https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/column-formatting#apply-formatting-based-on-date-ranges

     

    If you are new to column formatting, please refer to this link which will help you to get started - https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/column-formatting.

    Filipe Matos 

     

    Hope this helps. Thanks.

Resources