Forum Discussion
Conditional formatting list field based on multiple field values
- 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.
Hope this helps. Thanks.
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.
Hope this helps. Thanks.
- Filipe MatosApr 13, 2020Copper Contributor
Thank you, your answer has pointed me in the right direction.
I was able to combine a calculated column with a column formatting to meet my purpose.
Best regards
Filipe
- pnthrzruleApr 24, 2020Iron Contributor
There is actually an update rolling out globally that will help do this WITHOUT CODE! It landed in my tenant last week. Good luck - here is a link to the item in the road map. This link shows a lot of updates...but conditional formatting is the one I'm talking about. It's roadmap item
- Featured ID: 57305
- Filipe MatosApr 27, 2020Copper Contributor