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

how to filter data based on a collection in PowerApps?

Hi, 

 

I am fairly new to PowerApps and building a Questionnaire App (includes 6-9 different scenarios) for my team where I source some data from few SharePoint lists. I have a text box - StoreID which may contain 1 or more values separated by a delimiter ",". I need to filter a gallery of Interface IDs based of the StoreID populated. I am able to do it for single StoreID but I am stuck for Multiple storeIDs. 

 

Here is what I have so far:

For Single StoreID : 

Filter(CustomerList, Customer_ID = StoreID .Text) 

This formula works for 1 StoreID . 

 

For Multiple Store ID: 

1. First, created a collection to store multiple Store IDs when populated

ClearCollect(MultipleShopID,Split(StoreID .Text,","));

2. Second, below is the formula on the Gallery to display/filter Interface IDs for those multiple StoreID .

Filter(CustomerList, Customer_ID = MultipleShopID.Result)

 

FYI, StoreID and Customer_IDs are sourced from 2 different SharePoint list.

However, I am getting delegation error on the second formula.

"Delegation warning the filter part of this formula might not work correctly on large data sets."

 

Any help is appreciated.

 

Thank you,

Anna

1 ACCEPTED SOLUTION

Accepted Solutions
v-yuxima-msft
Community Support
Community Support

Hi @Anna0326 

 

That is just the warning.If you want to avoid the warning, please try to use one collection.

Collect your CustomerList firstly. Add one button control and then Button.OnSelect=ClearCollect(test,CustomerList)

Then Filter(test,MultipleShopID.Result)

 

More information:

delegation-overview#delegation-warnings

 

Best Regards.

Yumia

View solution in original post

1 REPLY 1
v-yuxima-msft
Community Support
Community Support

Hi @Anna0326 

 

That is just the warning.If you want to avoid the warning, please try to use one collection.

Collect your CustomerList firstly. Add one button control and then Button.OnSelect=ClearCollect(test,CustomerList)

Then Filter(test,MultipleShopID.Result)

 

More information:

delegation-overview#delegation-warnings

 

Best Regards.

Yumia

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,057)