cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
eroth
Level: Powered On

List of items from a Document Library filtered by value of site column.

On the surface this seems like it would be super simple, but I keep hitting dead ends. My approach has been to create a gallery with my document library as the data source. In that library, I have a Site Column based on managed metadata called "myorg Special Document Attributes". In PowerApps, I want to only display documents that have a specific value selected. To do this I have tried various iterations of formulas like this.

 

  ThisItem.'MyOrg Special Document Attributes'.Value = "Playbook"

 

The formula produces an error stating, "This formula uses scope, which is not presently supported for evaluation." Do I have a fundamental roadblock in trying to filter by managed metadata tags or is there a workaround/ better way to approach this?

 

4 REPLIES 4
Community Support Team
Community Support Team

Re: List of items from a Document Library filtered by value of site column.

Hi @eroth ,

 

Please try to set below formula in the Items property of the gallery control to achieve this:

Filter(ListName,'MyOrg Special Document Attributes'.Value = "Playbook")

 

Regards,

Mona 

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
eroth
Level: Powered On

Re: List of items from a Document Library filtered by value of site column.

Thank you Mona,

      Formatting the formula using your suggestion got rid of the error message, however it doesn't return any records. I think my issues stem from trying to use managed metadata (term set) Site Columns to filter which documents are shown. I did a test using a normal column to filter and it worked as expected.

      Can you think of any reason why managed metadata columns can't be used for filtering in Powerapps?

 

  - Ed

 

Community Support Team
Community Support Team

Re: List of items from a Document Library filtered by value of site column.

Hi @eroth ,

 

How is your Managed Metadata column configured? Please share the configuration. 

If it is a simple setup where it does not allow multiple values and it is using the term store name as its value, then your formula will be this:

Filter(ListName,'MyOrg Special Document Attributes'.Label= "Playbook")

 

If it is not that simple of a setup on the column, you might need to do more.  If you look at the column in PowerApps, you will see that it has several properties on it - one of which, in this case to use, is the Label property.  Others may be needed in your solution based on your column setup.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
eroth
Level: Powered On

Re: List of items from a Document Library filtered by value of site column.

Thank you @v-monli-msft. I appreciate the continued help. I think you are correct about the non-simple column settings.

The column is limited to term store values, but I want to allow multiple values if possible.

 

For example, some documents may have just "Playbook" set as a special attribute, but some may have "Knowledgebase" and "Playbook" specified. I looked at some of the other properties like "Value", "TermGUID", "Path", etc. but none of those seem to contain useful info.

If this seems like a bad approach i.e. likely to cause problems, let me know and I can figure out an alternate way to attack it.

 

PS. I used your filter statement on another managed metadata column that does not allow multiple values and it worked perfectly!

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (4,277)