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 a gallery from ...
Power Apps
Answered

Filter a gallery from ClearCollect and Dropdown selection

(0) ShareShare
ReportReport
Posted on by 53

I am creating a custom event calendar.  I use a connected SP list that contains the event start/end dates and a selectable column for who is to perform the event.  I utilize ClearCollect (colEvents) to gather all the events and place them in a child gallery but need to add a filter feature that allows me to only show a specific person's event.  My gallery displays the events using the following Filter:

 

Filter(colEvents, StartDate <= DateValue(lblCurrentDate.Text) And EndDate >= DateValue(lblCurrentDate.Text))

 

The dropdown items are as follows:

 

Choices('ConsultantActivity'.'Consultant')

 

How do I also incorporate the dropdown selection to the filter to display the events related to the individual selected?

 

Categories:
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @scottypotty4x4 

    If your Consultant column is a Person column, then your formula would be this:

    Filter(colEvents, 
     StartDate <= DateValue(lblCurrentDate.Text) &&
     EndDate >= DateValue(lblCurrentDate.Text) &&
     Consultant.Email = yourDropdown.Selected.Email
    )

    If it is something other than a person column, then please adjust as necessary or post back with more details on it.

     

    I hope this is helpful for you.

  • Anonymous_Hippo Profile Picture
    1,247 Super User 2024 Season 1 on at

    Hi @scottypotty4x4 ,

     

    In the below code replace "yourDropdown" with the control name of your dropdown...

    Can you try the following code inside the items property of your gallery

    Filter(colEvents, (StartDate <= DateValue(lblCurrentDate.Text) And EndDate >= DateValue(lblCurrentDate.Text)),(Len(yourDropdown.Selected.Value)=0 || 'Consultant'.Value in yourDropdown.Selected.Value))

     

     

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 283

#3
Mohsin Ali Profile Picture

Mohsin Ali 221

Last 30 days Overall leaderboard