web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / need to filter gallery...
Power Apps
Unanswered

need to filter gallery by list box control

(0) ShareShare
ReportReport
Posted on by 25

Hi ,i need code to need to filter gallery by list box control

list box is added with items

example

a

b

c

on selecting 'a' in the listbox---the gallery should be filtered -where isacolumn =1

gallery is having table1 

if the listbox is selected with a,b the gallery should be filtered -where isacolumn =1 and isbcolumn=1

table1 with below data

id     isacolumn ,isbcolumn, isccolumn

id1     1             0                1

id2      0             1                1

Categories:
I have the same question (0)
  • rsaikrishna Profile Picture
    3,703 on at

    @padma 

     

    If the items in the list box are static, then you can create global or context variables in the On Change property of list box.

     

    Set(varA, "a" in listbox.SelectedItems)  // If a is selected in the listbox, then varA will be true

    Set(varB, "b" in listbox.SelectedItems)  // If b is selected in the listbox, then varB will be true

    Set(varC, "c" in listbox.SelectedItems)  // If c is selected in the listbox, then varC will be true

     

    Now, in the Filter, you can write following logic:

     

    Filter(table1, if(varA, isacolumn=1,true), if(varB, isbcolumn=1,true), if(varC, isccolumn=1,true))

     

    I haven't executed above the above formula. Consider the approach and give a try.

     

    Regards

    Krishna Rachakonda

    If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 342 Most Valuable Professional

#2
11manish Profile Picture

11manish 234

#3
Valantis Profile Picture

Valantis 187

Last 30 days Overall leaderboard