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 / Filter Gallery with mu...
Power Apps
Answered

Filter Gallery with multiplw Togglebuttons

(0) ShareShare
ReportReport
Posted on by 8

Hi, building my first canvas app and struggle with making correct filter settings to a gallery. 

 

The function of the app is to search for technical literature. There are 4 types of literature and those are available in 5 different languages.

The data are on a sharepoint. I created a gallery with a search function by text. That works so far. But I would like to give the user the possiblilty to pre-limit the items visible in the gallery. For this purpose I created a page with several Togglebuttons.

 

 

20191028_101633000_iOS.png    20191028_101642000_iOS.png

 

I started with the following code

Filter(Filter(PowerApps
;Type = "Certificate"&&'T Certificate'.Value=true
Or Type = "Instruction Bulletin"&&'T Instruction Bulletin'.Value=true
Or Type = "Product Bulletin"&&'T Product Bulletin'.Value=true
Or Type = "MCS Table"&&'T MCS Table'.Value=true
Or Language = "German"&&'T German'.Value=true
Or Language = "French"&&'T French'.Value=true)
;SearchInput.Text in Title Or SearchInput.Text in AdditionalSearchString Or SearchInput.Text in Category)

 

But when I checked the function I noticed that everything is fine as long as I just use the toggles to limit the titems to show. But the language buttons do not work. When I uncheck i.e. German, I still see German documents in the gallery and in addition the settings I did with the items to show are not working any more (i.e I unchecked the toggle Certificates - no certificates in the list. But when I check in addition German documents the certificates appear back in the gallery even the toggle is still unchecked.

 

What did I mixed up here? And is using the filter function the best way for my task (Because I do have the delegation warning with my code)? I read something about changing a field in sharepoint with toggles ...

 

Thanks in advance for your support

 

Andreas

Categories:
  • Verified answer
    LRVinNC Profile Picture
    2,297 on at

    Currently your filter says if ANY of the conditions you list are true, show the record.  I believe what you really need is an AND between your set of type conditions and your set of language conditions with each of those groups in parentheses.  I marked my suggested changes in red below.

    Filter(Filter(PowerApps
    ;(Type = "Certificate"&&'T Certificate'.Value=true
    Or Type = "Instruction Bulletin"&&'T Instruction Bulletin'.Value=true
    Or Type = "Product Bulletin"&&'T Product Bulletin'.Value=true
    Or Type = "MCS Table"&&'T MCS Table'.Value=true)
    And (Language = "German"&&'T German'.Value=true
    Or Language = "French"&&'T French'.Value=true))
    ;SearchInput.Text in Title Or SearchInput.Text in AdditionalSearchString Or SearchInput.Text in Category)

    See if that gets you closer to what you are looking for.

  • AndreasGrosse Profile Picture
    8 on at

    Hello LRVinNC,

    thanks for your quick reply. It works fine now.

     

    Have a good day

    Andreas

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 239

Last 30 days Overall leaderboard