How to format a SharePoint Library column based on a metadata column

Ben Huxtable 0 Reputation points
2025-02-07T16:06:05.27+00:00

I have a SharePoint library with multiple choice columns and a Text column. The Text column has JSON formatting to show a button when the choice columns contain data (are not empty). This button kicks off a Power Automate Flow.

The following code for this works as intended :

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "button",
  "txtContent": "Publish",
  "customRowAction": {
    "action": "executeFlow",
    "actionParams": "{\"id\": \"v1/Default-9a24dbda-f3be-443b-910d-2793d0525bdd/4eb3006f-3071-4de4-823a-0a6bb2e2bd18\"}"
  },
  "style": {
    "background-color": "#0078d4",
    "color": "white",
    "border": "none",
    "cursor": "pointer",
    "padding": "6px 12px",
    "display": "=if([$Solutions] == '', || [$Phase] == '', || [$DocumentType] == '', 'none', 'inline-block')"
  }
}

However, I have realised I need to utilise metadata columns for this instead of choice columns, as I need these tags to be available across multiple libraries and sites. I'm not seeing much out there for understanding how to reference metadata columns or fix this, so any help or advice would be appreciated.

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
11,179 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
3,276 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. DBG 2,376 Reputation points
    2025-02-07T16:11:49.6333333+00:00
    0 comments No comments

  2. RaytheonXie_MSFT 38,721 Reputation points Microsoft Vendor
    2025-02-10T02:23:02.1966667+00:00

    Hi @Ben Huxtable

    Per my research, I am afraid Managed metadata column is not supported column formatting customRowAction executeFlow for managed metadata columns at this moment. Here is an document about Supported column types

    User's image


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.