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 / Link Toggle to Gallery...
Power Apps
Suggested Answer

Link Toggle to Gallery filter

(1) ShareShare
ReportReport
Posted on by 4
I want a simple 'Show Only My Tasks' switch. I added a Toggle control, but I don't know how to link it to my Gallery
I have the same question (0)
  • Suggested answer
    Vish WR Profile Picture
    3,748 on at

    In your Gallery's Items property,

    use an If statement: 

    Filter(Tasks, If(Toggle1.Value, AssignedTo = User().Email, true)).

    This shows only your tasks when the toggle is "On" and everything when it's "Off."

  • WarrenBelz Profile Picture
    155,840 Most Valuable Professional on at
    Adding to @Vish WR's post, you may have a Delegation isssue with an If argument inside a filter, so you can do this
    Filter(
       Tasks, 
       Toggle1.Value && 'Created By'.DisplayName = User().Email
    )
    As you did not post exactly what "my tasks" consist of, I have included an option if it refers the the user who created the record  (I am assuming you are using SharePoint as the data source). Otherwise, use the field that refers to this. 
     
    Please Does this answer your question 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 answering Yes to Was this reply helpful? or give it a Like
    Visit my blog
    Practical Power Apps    LinkedIn  
  • Suggested answer
    MS.Ragavendar Profile Picture
    7,431 Super User 2026 Season 1 on at
     
    I am extending the logic of @WarrenBelz as delegable friendly
     
    With(
        {
            isOn: Toggle1.Value,
            currentUserEmail: User().Email
        },
        Filter(
            Tasks,
            isOn &&
            'Created By'.Email = currentUserEmail
        )
    )
     
    ✅If this helped, please Accept as Solution to help others ❤️ A Like is appreciated 🏷️ Tag @MS.Ragavendar for follow-ups.
  • WarrenBelz Profile Picture
    155,840 Most Valuable Professional on at
    A quick follow-up to see if you received the answer you were looking for. Happy to assist further if not.
     
    Please Does this answer your question 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 answering Yes to Was this reply helpful? or give it a Like ♥
    Visit my blog
    Practical Power Apps    LinkedIn   

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard