Forum Discussion

lorinda_abey's avatar
lorinda_abey
Copper Contributor
Feb 06, 2024
Solved

Approval Status field to turn red when status is Pending AND file was Modified 30 days ago (or more)

I have a document library in SharePoint that has approval flows set up. However some approvers are not responding within the 30 day limit and flows are timing out.   To make it clear which file app...
  • ganeshsanap's avatar
    Feb 06, 2024

    lorinda_abey Try using JSON column formatting for your Approval Status column like: 

     

    {
      "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
      "elmType": "div",
      "txtContent": "@currentField",
      "style": {
        "color": "=if(@currentField=='Pending' && [$Modified] < addDays(@now,-30),'red','')",
        "font-weight": "=if(@currentField=='Pending' && [$Modified] < addDays(@now,-30),'bold','')"
      }
    }

     

    Where [$Modified] is an internal name of your modified date column in SharePoint list in this format: [$InternalNameOfColumn]. You can get the internal name of your SharePoint list columns by following this article: How to find the Internal name of columns in SharePoint Online?

    Output


    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.

Resources