Question

So apparently managed metadata fields are not supported with ODATA Filter Queries in MS Flow. We need a workaround so we can filter the results from a 'Get items' action. Does anyone know a clever way (besides copying the metadata to a text field) to filter on managed metadata using Flow?

Was it helpful?

Solution

If you have a list named Test that contains a managed metadata field named Department, you can get all of the items where the value of the Department field is Accounting using the following SharePoint REST API POST request:

_api/Web/lists/getByTitle('Test')/GetItems(query=@v1)?@v1={"ViewXml":"<View><Query><Where><Eq><FieldRef Name='Department'/><Value Type='TaxonomyFieldType'>Accounting</Value></Eq></Where></Query></View>"}

In Flow you would use the Send an HTTP request to SharePoint to make that REST API call.

SharePoint REST API call in Flow

You could then use a Select action to extract the values you need from the response. In the example below I'm selecting the value of the Title field.

Using the Select action to extract the Title field values

The value of the From expression is: body('Send_an_HTTP_request_to_SharePoint')['d']['results']

The value of the Title expression is: item()['Title']

OTHER TIPS

There is a workaround for this issue is adding a Condition. Then use the dynamic content of Managed metadata label to check if it equal to the specific value.

More information check the similar post:

https://powerusers.microsoft.com/t5/Building-Flows/Filtering-taxonomy/td-p/278941

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top