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 / Filtering dropdown cau...
Power Apps
Answered

Filtering dropdown causes error in gallery filter

(0) ShareShare
ReportReport
Posted on by 66

Okay...this one has me stumped. 
I have a gallery on my form called "galMinutes" and am using the following filters to filter for specific data:

Filter(FCTminutes,
 
 And(
 Or( 
 IsBlank(dpStartDate.SelectedDate),
 Date >= dpStartDate.SelectedDate
 ),
 Or( 
 IsBlank(dpEndDate.SelectedDate), 
 Date <= dpEndDate.SelectedDate
 ),
 Or( 
 IsBlank(dpGradeLevel.Selected.Value), 
 Grade.Value = dpGradeLevel.Selected.Value
 ),
 Or(
 IsBlank(dpFilterSchool.Selected.Value), 
 Title = dpFilterSchool.Selected.Value
 ),
 Or(
 IsBlank(dpFCTname.Selected.Value), 
 'FCT Name' = dpFCTname.Selected.Value
 )

 )
)

filter screenshot.png

If I add the following code to the 'items' property of my dpFCTname dropdown box:

Sort(Distinct('FCTminutes', 'FCT Name'),Value)

The gallery filters without error. But when I try to filter the dpFCTname dropdown box based on the School (title) dropdown box I get an error in the filter of my gallery:
error.png
So ultimately I would like to filter my dpFCTname dropdown based on the School Dropdown (dpFilterSchool) and Grade Level dropdown box (dpGradeLevel). But haven't got there yet 'cause I keep erroring out with just trying to filter based on the school dropdown (dpFilterSchool).

Any ideas would be most appreciated. 

 

Categories:
  • WarrenBelz Profile Picture
    156,526 Most Valuable Professional on at

    Hi @Raizo ,

    Is that a single or multiple selection Combo Box and to clarify the Items is definitely

    Sort(
     Distinct(
     'FCTminutes', 
     'FCT Name'
     ),
     Value
    )

     Also when you select the control and then Edit in the right panel, what is shown in the Primary Text drop-down ?

  • Raizo Profile Picture
    66 on at

    Thanks for the quick response Warren,  I do not have any combo boxes. All are dropdowns. The screenshot below will show you the properties on the dropdown. So I would like only show only the FCT Names found only in the Schools and Grade levels select on the other two dropdown boxes. screenshot.png

  • WarrenBelz Profile Picture
    156,526 Most Valuable Professional on at

    Hi @Raizo ,

    This is making less sense now as you have confirmed that the output of the dpFCTname is Value (the Items also support this, but I was checking in case something else weird was going on).

    When you type in dpFCTname.Selected.  what comes up in the bottom panel as the possible values ?

  • Raizo Profile Picture
    66 on at

    Well seemed to fix it when I type in:

     

    Or(
     IsBlank(dpFCTname.Selected.'FCT Name'), 
     'FCT Name' = dpFCTname.Selected.'FCT Name'
     )

     

    instead of .value I use .'FCT Name'  but now I am trying to figure out the dropdown filtering:
    screenshot.png

    'cause the FCT Name dropdown is not showing anything at the moment. 

  • Raizo Profile Picture
    66 on at

    Nevermind...when I set my dropdown value on the properties panel to 'FCT Name' (was on a different value) then it filtered fine. 

  • WarrenBelz Profile Picture
    156,526 Most Valuable Professional on at

    Hi @Raizo ,

    I think there is something corrupt with that control - try a new one.

  • Raizo Profile Picture
    66 on at

    But what I really need is to get this code:

    Filter(FCTminutes, Title = dpFilterSchool.Selected.Value)

    to work even if nothing is entered into the school dropdown. The FCT dropdown should just show all values but right now it shows nothing if the School dropdown is empty.

     

     

     

  • Verified answer
    WarrenBelz Profile Picture
    156,526 Most Valuable Professional on at

    Hi @Raizo ,

    You should need

    Filter(
     FCTminutes,
     Len(dpFilterSchool.Selected.Value) = 0 || 
     Title = dpFilterSchool.Selected.Value
    )

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • Raizo Profile Picture
    66 on at

    Yep! That worked. Thanks Warren!

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 393 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 278 Most Valuable Professional

Last 30 days Overall leaderboard