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 record from sel...
Power Apps
Unanswered

Filter record from selected component in Gallery

(0) ShareShare
ReportReport
Posted on by 35

Hello Everyone,

 

Please help me in my priority task.

 

dyna009_0-1655364078165.png

In this Gallery i am filtering record. in this, if i select start date and end date i want all record between two dates.

suppose i select start date, end date and employee then filter only selected employee record between two dates. 

if i select only employee then need to filter selected employees all request till today.

 

currently i am filter record like below code

 

Filter(
 Requests,
 'Start Date' >= StartDatePicker.SelectedDate && 'End Date' <= EndDatePicker.SelectedDate && Requester in EmpListComboBox.SelectedItems
)

 

 

 

Categories:
  • uwenagel Profile Picture
    382 on at

    You could change your filter condition as follows:

     

    Filter(
     Requests,
     ('Start Date' >= StartDatePicker.SelectedDate || IsBlank(StartDatePicker)) && ('End Date' <= EndDatePicker.SelectedDate || IsBlank(EndDatePicker)) && (Requester in EmpListComboBox.SelectedItems || IsBlank(Requester))
    )

     

    You of course have to set the DefaultDate of your DatePickers to Blank() for that to work.

  • dyna009 Profile Picture
    35 on at

    hi @uwenagel  

    Thank for reply.

    It is works.

  • dyna009 Profile Picture
    35 on at

    @uwenagel 

    i am writing below code and its work fine according to my requirement 

     Filter(
     Requests,
     ('Start Date' >= StartDatePicker.SelectedDate && 'End Date' <= EndDatePicker.SelectedDate) 
     ),
    
     !IsBlank(RequestTypeDropdown),
     Filter(
     Requests,
     ('Start Date' >= StartDatePicker.SelectedDate && 'End Date' <= EndDatePicker.SelectedDate) && Requester in EmpListComboBox.SelectedItems && 'Request Status' in StatusDropdown.SelectedText.Value && 'Request Type' in RequestTypeDropdown.SelectedText.Value
     ),
     !IsBlank(EmpListComboBox),
     Filter(
     Requests,
     ('Start Date' >= StartDatePicker.SelectedDate && 'End Date' <= EndDatePicker.SelectedDate) && Requester in EmpListComboBox.SelectedItems
     ),
     !IsBlank(StatusDropdown),
     Filter(
     Requests,
     ('Start Date' >= StartDatePicker.SelectedDate && 'End Date' <= EndDatePicker.SelectedDate) && Requester in EmpListComboBox.SelectedItems && 'Request Status' in StatusDropdown.SelectedText.Value
     )
     
    )
  • uwenagel Profile Picture
    382 on at

    Did you try my suggestion as well? It should work as well and is very much shorter!

  • dyna009 Profile Picture
    35 on at

    hi @uwenagel 

    i have try your suggestion as well, but i want to set all filter. and also your answer is worked

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 258

#3
Mohsin Ali Profile Picture

Mohsin Ali 231

Last 30 days Overall leaderboard