cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ddrummond
Regular Visitor

Filter Gallery

Hello,

 

Fairly new to powerapps, I have a quick question.

 

I have a main gallery with tick boxes. I want a secondary gallery to display all the rows from my data source that match any of the ticked boxes from the first gallery. Currently it only displays rows that match only the first tick from the main gallery. 

 

The current command I am using is : Filter(Devices, TechniqueID = Gallery2 .Selected.TechniqueID)

 

Any suggesting much appeciated,

 

Cheers,

 

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @ddrummond ,

Note you will get a Delegation warning here

With(
   {
      wChecked:
      Filter(
         Gallery2.AllItems,
         CheckboxName.Value
      )
   },
   Filter(
      Devices, 
      TechniqueID in wChecked.TechniqueID
   )
)

If Devices will never be over 2,000 items and you want to get rid of the warning

With(
   {
      wChecked:
      Filter(
         Gallery2.AllItems,
         CheckboxName.Value
      ),
      wDevices:Devices
   },
   Filter(
      wDevices, 
      TechniqueID in wChecked.TechniqueID
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

3 REPLIES 3
WarrenBelz
Super User
Super User

Hi @ddrummond ,

Note you will get a Delegation warning here

With(
   {
      wChecked:
      Filter(
         Gallery2.AllItems,
         CheckboxName.Value
      )
   },
   Filter(
      Devices, 
      TechniqueID in wChecked.TechniqueID
   )
)

If Devices will never be over 2,000 items and you want to get rid of the warning

With(
   {
      wChecked:
      Filter(
         Gallery2.AllItems,
         CheckboxName.Value
      ),
      wDevices:Devices
   },
   Filter(
      wDevices, 
      TechniqueID in wChecked.TechniqueID
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

ddrummond
Regular Visitor

Thanks for the reply @WarrenBelz 

 

I tried the code you suggested but it hasn't quite worked. See screen shot below:

ddrummond_0-1626261430774.png

I think its a pretty simple thing I am trying to do, it's frustrating it can work it out.

 

Thanks,

@ddrummond ,

Free-typed code strikes again - please see amended code on post

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PWREduCon768x460.png

Join us at PWR EduCon - A Power Platform Conference

Learn from the top Power BI, Power Apps, Power Automate & Power Virtual Agents experts!

Top Solution Authors
Top Kudoed Authors
Users online (3,120)