cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Kvist80
Frequent Visitor

Filtering taxonomy

Hi 

 

I'm stuck and Google has not been my friend in need this time.

 

I want to filter a get item from a sharepoint doc library on a metadata field with values from the taxonomy word set, but trail and error always ends up with error.

 

Isn't it possible to filter on managed metadata?

 

This should work in my book

 

Kategori eq 'Timeregnskaber Tilsyn', "Kategori" being the column name and "Timeregnskaber Tilsyn" being the value. The value is actually "Løn og Kørsel:Timeregnskaber Tilsyn" because the value I use is a sub of another value.

 

Any other work arounds because my flow is taking forever to fiddle through all items in the list.

1 ACCEPTED SOLUTION

Accepted Solutions
v-yamao-msft
Community Support
Community Support

Hi @Kvist80 ,

 

Are you using Filter query of SharePoint action Get items?

 

I am afraid that not all the column types are supported in Filter query, such as Choice column, Lookup column.

 

Per my certain test, Managed metadata column is also not supported currently. If you need this feature, please feel free submit your request on Flow Ideas Forum:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

 

Further, 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.

Note: the returned value of Managed metadata column is of type String.

1.PNG

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-yamao-msft
Community Support
Community Support

Hi @Kvist80 ,

 

Are you using Filter query of SharePoint action Get items?

 

I am afraid that not all the column types are supported in Filter query, such as Choice column, Lookup column.

 

Per my certain test, Managed metadata column is also not supported currently. If you need this feature, please feel free submit your request on Flow Ideas Forum:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

 

Further, 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.

Note: the returned value of Managed metadata column is of type String.

1.PNG

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi

 

Thank you for your response. I've found a work around for my specific case. Hopefully this will be poswsible in the near future.

Found this online and it works, but it filters on all the taxonomy fields on the item.

 

https://itgeneralisten.wordpress.com/2018/10/09/filter-a-sharepoint-list-on-a-managed-metadata-field... 

 

Jaco_Campher_1-1601987090330.png

 

Dear  v-yamao-msft (microsoft.com)

This Filter Condition is not working on my side.

Do i have to filter the ManagedMetadataColumn.Label from the Get Items Lists Value with the string(body('Get_File_Properties')?['ManagedMetadataColumn']?['Label']) ?

nickellis74
Resolver II
Resolver II

I found this thread after googling how to filter on a Managed Metadata column. It helped push my thinking a bit, but I wanted to share the full solution I built (I am sure not the only solution) for others struggling with this pain!

 

In my scenario I have a managed metadata column [Email Recipient] that just has three names in it. There is then a standard Single Line of Text column [Email] containing email addresses. The flow takes an input [Who gets the email?] of a name and returns the corresponding email address.

 

  1. Standard, unfiltered Get Items on the list (it will say you should add some oData filtering for performance but of course we know that doesn't work)
  2. Filter Array, input is the value of the Get Items action, [Email recipient] is equal to [Who gets the email?]. Being honest, I don't think this does anything in terms of filtering, but it does convert the output into JSON which is what I really needed, and you can't use Filter Array without giving it a filter parameter.
  3. Inside an Apply to Each loop on the Body output of the Filter Array
    1. Compose on Current Item
    2. Parse JSON (see sample below, but you obviously need to generate your own to get the structure right)
    3. Put first of the [Email] outputs (there are others because it also returns the tag creator and other bits) into a variable
  4. Respond to a PowerApp supplying the variable

The full flow looks like this:

Filtering on Metadata.png

It is conceivable that the Compose AND the Parse JSON is overcooking it a bit, but it works and I'm not tempted to fiddle about with it now!

 

{
    "type": "object",
    "properties": {
        "@@odata.etag": {
            "type": "string"
        },
        "ItemInternalId": {
            "type": "string"
        },
        "ID": {
            "type": "integer"
        },
        "Title": {
            "type": "string"
        },
        "Email_x0020_Recipient": {
            "type": "object",
            "properties": {
                "@@odata.type": {
                    "type": "string"
                },
                "TermGuid": {
                    "type": "string"
                },
                "WssId": {
                    "type": "integer"
                },
                "Label": {
                    "type": "string"
                },
                "Path": {},
                "Value": {
                    "type": "string"
                }
            }
        },
        "Email_x0020_Recipient#WssId": {
            "type": "integer"
        },
        "Email": {
            "type": "string"
        },
        "Modified": {
            "type": "string"
        },
        "Created": {
            "type": "string"
        },
        "Author": {
            "type": "object",
            "properties": {
                "@@odata.type": {
                    "type": "string"
                },
                "Claims": {
                    "type": "string"
                },
                "DisplayName": {
                    "type": "string"
                },
                "Email": {
                    "type": "string"
                },
                "Picture": {
                    "type": "string"
                },
                "Department": {},
                "JobTitle": {}
            }
        },
        "Author#Claims": {
            "type": "string"
        },
        "Editor": {
            "type": "object",
            "properties": {
                "@@odata.type": {
                    "type": "string"
                },
                "Claims": {
                    "type": "string"
                },
                "DisplayName": {
                    "type": "string"
                },
                "Email": {
                    "type": "string"
                },
                "Picture": {
                    "type": "string"
                },
                "Department": {},
                "JobTitle": {}
            }
        },
        "Editor#Claims": {
            "type": "string"
        },
        "{Identifier}": {
            "type": "string"
        },
        "{IsFolder}": {
            "type": "boolean"
        },
        "{Thumbnail}": {
            "type": "object",
            "properties": {
                "Large": {},
                "Medium": {},
                "Small": {}
            }
        },
        "{Link}": {
            "type": "string"
        },
        "{Name}": {
            "type": "string"
        },
        "{FilenameWithExtension}": {
            "type": "string"
        },
        "{Path}": {
            "type": "string"
        },
        "{FullPath}": {
            "type": "string"
        },
        "{HasAttachments}": {
            "type": "boolean"
        },
        "{VersionNumber}": {
            "type": "string"
        }
    }
}

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022- Season 2 has kicked off!

Users online (4,439)