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

Using Filter() with collections doesn't work anymore

Hi, until last week my app was working fine (three months in live operation without problems), but suddenly and unexpectedly I have a lot of problems. For example I can't open the App checker anymore.

 

Another problem I have relates to the Filter()-Function. So far I have used this formula to display my filtered records in a gallery: Filter(MyCollection;MyItemID=BrowseGallery1.Selected.MyItemID)

 

Although nothing has changed, the gallery displays no items anymore (the collection has a lot of matching items).

 

At first sight, it might seem that my problems relate to the PowerApp Updates.

 

Best regards

 

Stef

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Using Filter() with collections doesn't work anymore

Hi @PowerAnalytics ,

Do you mean that your Filter() function not work with your Collection within your app?

 

I have made a test on my side, and don't have the issue that you mentioned. Please consider take a try to re-create your Collection with another name within your app again, then try your Filter formula within your Gallery, check if the issue is solved.

Set the OnStart property of the App control or OnVisible property of the first screen of your app to following:

ClearCollect(
                AnotherCollection,           /* <-- Re-create your collection, rename it with a different name */
                'YourDataSource'
)

Set the Items property of the Gallery to following:

Filter(
AnotherCollection;
MyItemID = BrowseGallery1.Selected.MyItemID
)

If the issue still exists, please consider take a try to re-create a new app based on your SP list, check if the issue is solved.

 

Best regards,

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

Re: Using Filter() with collections doesn't work anymore

Hi @PowerAnalytics ,

Do you mean that your Filter() function not work with your Collection within your app?

 

I have made a test on my side, and don't have the issue that you mentioned. Please consider take a try to re-create your Collection with another name within your app again, then try your Filter formula within your Gallery, check if the issue is solved.

Set the OnStart property of the App control or OnVisible property of the first screen of your app to following:

ClearCollect(
                AnotherCollection,           /* <-- Re-create your collection, rename it with a different name */
                'YourDataSource'
)

Set the Items property of the Gallery to following:

Filter(
AnotherCollection;
MyItemID = BrowseGallery1.Selected.MyItemID
)

If the issue still exists, please consider take a try to re-create a new app based on your SP list, check if the issue is solved.

 

Best regards,

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

Re: Using Filter() with collections doesn't work anymore

Hi Kris,

 

I really appreciate your help, thank you very much.

 

I tried your suggestion but I had the same problem.

 

The problem was that I had a delegation issue. Currently some of my collections covers more than 500 items. So all I had to to do was to create a new collection with ClearCollect() (for example on the OnVisible property) and instantly filter my items within this collection.

 

Example:

ClearCollect(colMyNewFilteredCollection;Filter(MySharePointList;ItemID=BrowseGallery1.Selected.ItemID))

 

With this new Collection I'm now able to display the filtered items within gallerys etc.

 

What do you think about this approach?

 

Best regards,

 

Stef

Community Support Team
Community Support Team

Re: Using Filter() with collections doesn't work anymore

Hi @PowerAnalytics ,

If the amount of your data source records is not more than 2000, as an alternative solution, I agree with the solution that you mentioned.

 

In addition, the solution I provided above has same direction as you, which I think could also achieve your needs (get rid of this Delegation warning issue).

 

If you have solved your problem, please go ahead to click "Accept as Solution" to identify this thread has been solved.

 

Best regards,

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

Re: Using Filter() with collections doesn't work anymore

Hi @v-xida-msft ,

what will happen if the amount of my sharepoint data source records is more than 2000?

 

Currently I'm collecting and filtering specific data source records on demand.

 

For example: OnVisible Property:

ClearCollect(colMyCollection;Filter(DataSource;ID=BrowseGallery1.Selected.ID)

 

Will this work if the amount of my sharepoint data source records is more than 2000?

 

Best regards

 

Stef

 

 

 

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

Follow PowerApps on Twitter

Stay Up-to-Date by following PowerApps on Twitter

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

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

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

Users Online
Currently online: 50 members 4,225 guests
Please welcome our newest community members: