Managed Metadata Column, Term Label Returns Some ID Instead of Actual String Value

Copper Contributor

I have a flow which will get file properties from a library that contains a managed metadata column. But when I run the flow, the term label value returns some ID instead of the actual string value.

 

The actual Label value should be something like "Fire Protection" and not 109.

 

dotem_0-1672041279576.png

I can't find a way to get the Label string using any other way. 

Is this the actual behavior or it's a bug? I'm not sure. 

Is there any other way to get the Label value?

 

Thanks. 

 

 

2 Replies

Hi @dotem 

 

I tried to replicate your scenario but I was able to get the managed metadata column value correctly in the flow. 

 

My column name is 'MMD', and I used the step 'Get file properties' (SharePoint) and was able to get the output as below :

aneetz_0-1672224649538.png

 

Do you not get the same output when using the step 'Get file properties'? 

How is your term store values configured? 

 

Regards,

 

 

Hi @dotem ,

 

this issue depends on how exactly you are accessing the file properties from the document library.

This for example works without problems if i use the action "Get files (properties only)".
But i get the same (wrong) results as you, if i use an "Send an HTTP request to SharePoint" action like this

_api/web/lists/getbytitle('<ListName>')/items


If you use the "Send an HTTP request to SharePoint" action you should take a look at the following article for a workaround to that case:

"https://sympmarc.com/2017/06/19/retrieving-multiple-sharepoint-managed-metadata-columns-via-rest/" .
The idea is to expand the "TaxCatchAll" Field like this (MM is my metadata colum)

_api/web/lists/getbytitle(<ListName>)/items?$select=Title,MM,TaxCatchAll/ID,TaxCatchAll/Term&$expand=TaxCatchAll

Now you will still get the wrong value for die metadata column, but you will now get an additional "TaxCatchAll" property where you can lookup the correct label for the id

"MM": {
    "__metadata": {
      "type": "SP.Taxonomy.TaxonomyFieldValue"
    },
    "Label": "5",
    "TermGuid": "cd04183c-45ce-4e21-b53d-c36659f5cee9",
    "WssId": 5
  },
  "TaxCatchAll": {
    "results": [
      {
        "__metadata": {
          "id": "771205b8-8892-442b-a76a-a4e22a786883",
          "type": "SP.Data.TaxonomyHiddenListListItem"
        },
        "ID": 5,
        "Term": "Term2"
      }
    ]
  }



If it is not the case that you are using the "Send an HTTP request to SharePoint" action to get the file metadata...
Which PowerAutomate action exactly are you using to get the properties from SharePoint?