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

Filter gallery by multiple criteria

I read through several other posts on filtering and being new,  I just don't understand how to apply it.  I have a page, that takes a selected project id from the previous page and displays all the project tasks.  This works great.  However, I want to filter the list based on the "% Complete" not equal to "100" and the resource name being the user.  I've been trying to add a Filter to the Items, but it doesn't like the ProjectOnline.ListTasks as a datasource.

 

Below is how the "Items" is set.  Any suggestions on how to add the filters would be appreciated.

 

Capture.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
strategery
Level 8

Re: Filter gallery by multiple criteria

Ah, well apparently just ProjectOnline.ListTasks() doesn't return a table, but a search led me here: https://www.carlosag.net/PowerApps/Connectors/Project-Online#_Toc492EB964ListTasks So if I'm going thru this information right, your filter might work as: Filter(ProjectOnline.ListTasks( ... ).value, PercentComplete<100) This may be what you tried to begin with, I'm not sure. If this works, we can work on filtering by user then
6 REPLIES 6
strategery
Level 8

Re: Filter gallery by multiple criteria

I'm unfamiliar with .ListTasks and curious...what connection and datasource is that you are using? If I can replicate what you are doing maybe I can help figure it out

strategery
Level 8

Re: Filter gallery by multiple criteria

Just answered my own question....Microsoft Project Online.  I don't have access to this but maybe I can help clear up Filter command.

 

Filter wants a 'Table' as the datasource. Your "Items" pictured is drilling all the way down to .Value

Instead, try removing .Value and wrap a filter around that...

Filter(ProjectOnline.ListTasks(ProjectList.Selected.Id,"url"), PercentComplete<>100, <condition2>, <condition3>)

 

No idea what "PercentComplete" actually is, that's just a guess. It should provide you a list of the items when you reach that point in the expression

chrisreed
Level: Powered On

Re: Filter gallery by multiple criteria

While I was playing with the gallery I found If I remove the ".value", my gallery won't display any data.  Removing it now, and adding the Filter, the Filter command errs for an "Invalid Argument type" for the data parameter.

strategery
Level 8

Re: Filter gallery by multiple criteria

Ah, well apparently just ProjectOnline.ListTasks() doesn't return a table, but a search led me here: https://www.carlosag.net/PowerApps/Connectors/Project-Online#_Toc492EB964ListTasks So if I'm going thru this information right, your filter might work as: Filter(ProjectOnline.ListTasks( ... ).value, PercentComplete<100) This may be what you tried to begin with, I'm not sure. If this works, we can work on filtering by user then
chrisreed
Level: Powered On

Re: Filter gallery by multiple criteria

 I'm really embarrased Man Embarassed  I would have swore I tried that exact syntax and it erred.  I tried again and it worked.  I've been poking it from so many different directions I may have had a typo.  I greatly appreciate your assistance.

strategery
Level 8

Re: Filter gallery by multiple criteria

Don't be, it's buggy. I find that cutting the text and re-pasting it back in the expression box works many times. You very well may have had it before. Sometimes it shows you one thing but actually has something else 'stored'....

 

I've saved/closed an app, restarted browser, and re-opened an app to find that "Items" contained "Filter(mycolle" when it was actually showing me "Filter(mycollection, blah=blah)" before I saved it. It's like it doesn't register everything typed at times

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Users Online
Currently online: 121 members 4,557 guests
Please welcome our newest community members: