Conditional formatting rule trouble

Copper Contributor

Hello! I am looking to get the "Actual FTEE" column in my SharePoint List to highlight red if it is less than the "Approved FTEE" column. How do I make this happen? Both columns are formatted as "number" if that matters. Thank you!

 

denhm24_0-1661894367053.pngdenhm24_1-1661894410969.png

 

3 Replies

@denhm24 Follow the steps:

  1. Add any random value in highlighted text box, click Save and then click on "Advanced mode" link: ganeshsanap_0-1661918792115.png  
  2. In advanced mode JSON, replace random value entered with the internal name of your Approved FTEE column and click Save. Final JSON should be similar to: 

 

{
    "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
    "elmType": "div",
    "style": {
        "box-sizing": "border-box",
        "padding": "0 2px",
        "overflow": "hidden",
        "text-overflow": "ellipsis"
    },
    "attributes": {
        "class": {
            "operator": ":",
            "operands": [
                {
                    "operator": "<",
                    "operands": [
                        "[$ActualFTEE]",
                        "[$ApprovedFTEE]"
                    ]
                },
                "sp-css-backgroundColor-BgCoral sp-css-borderColor-CoralFont sp-field-fontSizeSmall sp-css-color-CoralFont",
                ""
            ]
        }
    },
    "txtContent": "[$ActualFTEE.displayValue]"
}​

 


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.

For SharePoint/Power Platform blogs, visit: Ganesh Sanap Blogs

Thank you, @ganeshsanap !!

I had to edit under the list settings/edit column, but it worked! Much appreciated!!

@denhm24 You're welcome, glad it worked for you! 


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.