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 / If and statement in Ga...
Power Apps
Answered

If and statement in Gallery Items

(0) ShareShare
ReportReport
Posted on by 4

Hello

 

I am pretty new to Power apps but trying to get 2 toggles to work in gallery items. i have written then below *excel knowledge) but cant seem to get it to work in powerapps ... Please help 🙂

 

Filter(
'Team Leader Leave',
If(
And(
Toggle1.Value = false,Toggle2.value=false),
'Approval Status'.Value <> "Pending",'Created By'.Email <> User().Email,
if(
And(
Toggle1.Value = false,Toggle2.value=true),
'Approval Status'.Value = "Pending",'Created By'.Email <> User().Email,
if(
And(
Toggle1.Value = true,Toggle2.value=true),
'Approval Status'.Value = "Pending",'Created By'.Email = User().Email,
if(
And(
Toggle1.Value = true,Toggle2.value=false),
'Approval Status'.Value <> "Pending",'Created By'.Email = User().Email
)
)
)
)
)

Categories:
I have the same question (0)
  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @dude_sweet7 

    With({cond1:!Toggle1.Value&&!Toggle2.Value,
     cond2:!Toggle1.Value ,Toggle2.Value,
     cond3:Toggle1.Value ,Toggle2.Value,
     tll:'Team Leader Leave',
     asv: 'Approval Status'.Value ,
     cbe:'Created By'.Email
     },
     
     If(cond1, Filter(tll, asv<>"Pending", cbe<>User().Email),
     cond2, Filter(tll, asv="Pending", cbe<>User().Email), 
     cond3, Filter(tll, asv="Pending", cbe=User().Email), 
     Filter(tll, asv<>"Pending", cbe=User().Email)
     )
    )
    
  • dude_sweet7 Profile Picture
    4 on at

    Awesome..Thanks for the speed Reply 🙂

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 329 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard