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
Highlighted
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
Highlighted
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.
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