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 / Power Apps Filter Coll...
Power Apps
Answered

Power Apps Filter Collection with Dropdown selection

(0) ShareShare
ReportReport
Posted on by 12

Greetings,

I have an app that filters the collection based on multiple (optional) fields when the data is loaded.  This all working fine, until I attempt to an additional filter based on whether a 'Completed Date' field has been entered.  The filter is ddEART_StatusFilter and has values of "Active, Completed, All".  If Active is chosen, the filter should include all records with a blank completed date; Completed should filter all records with a completed date; and All should show all records. It works with the exception of all.  I'm sure I'm overlooking something easy.

 

The filters for that dropdown are shown in orange text below. Appreciate any guidance!

 

 

 

Search(

    Sort(

        Filter(

            colEngReq,

                     IsBlank(ddEART_GridFilter_ReqType.Selected.Value) || false || 'Request Type'.Value = ddEART_GridFilter_ReqType.Selected.Value,

                     IsBlank(ddEART_GridFilter_FO.Selected.Value) || false || 'Field Office' = ddEART_GridFilter_FO.Selected.Value,

                     IsBlank(ddEART_GridFilter_AssignedTo.Selected.Value) || false || AssignedTo.Value = ddEART_GridFilter_AssignedTo.Selected.Value,

                     ddEART_FiscalYearFilter.Selected.Value = "All" || 'Fiscal Year' = ddEART_FiscalYearFilter.Selected.Value,

            If(

                ddEART_StatusFilter.Selected.Value = "Active",

                IsBlank('Completed Date'),

                If(ddEART_StatusFilter.Selected.Value = "Completed",

                !IsBlank('Completed Date'),"")

            )

        ),

        ID,

        SortOrder.Descending

    ),

       txtEART_GridFilter_Participant.Text,

    "Participant"

)

 

Categories:
I have the same question (0)
  • Verified answer
    Michael E. Gernaey Profile Picture
    53,968 Super User 2026 Season 2 on at

    Hi @tlking 

     

    For the All section just put true, not an expression , other than true


    If you like my answer, I would really appreciate if you please Mark it as Resolved, and give it a thumbs up, so it can help others

    Cheers

    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

     

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

    Hi @tlking ,

    Try this format- If() expressions inside a filter are not generally the best structure.

    Search(
     Sort(
     Filter(
     colEngReq,
     (
     Len(ddEART_GridFilter_ReqType.Selected.Value) = 0 || 
     'Request Type'.Value = ddEART_GridFilter_ReqType.Selected.Value
     ) &&
     (
     Len(ddEART_GridFilter_FO.Selected.Value) = 0 || 
     'Field Office' = ddEART_GridFilter_FO.Selected.Value
     ) &&
     (
     Len(ddEART_GridFilter_AssignedTo.Selected.Value) = 0 || 
     AssignedTo.Value = ddEART_GridFilter_AssignedTo.Selected.Value
     ) &&
     (
     ddEART_FiscalYearFilter.Selected.Value = "All" || 
     'Fiscal Year' = ddEART_FiscalYearFilter.Selected.Value
     ) &&
     (
     ddEART_StatusFilter.Selected.Value = "All" || 
     (
     ddEART_StatusFilter.Selected.Value = "Active" &&
     IsBlank('Completed Date')
     ) ||
     (
     ddEART_StatusFilter.Selected.Value = "Completed" &&
     !IsBlank('Completed Date')
     )
     )
     ),
     ID,
     SortOrder.Descending
     ),
     txtEART_GridFilter_Participant.Text,
     "Participant"
    )

     

    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

  • tlking Profile Picture
    12 on at

    Both solutions from  FLMike and WarrenBelz resolved the issue.  I used Warren's solution since it cleaned up my coding.

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
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard