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 gallery based o...
Power Apps
Answered

filter gallery based on toggle value in power form

(0) ShareShare
ReportReport
Posted on by 65

I have a PowerApp form connecting to a SharePoint List.
The list contains a field (type Toggle) called 'Document Approved' status.
I already have a filter based on the 'Created by' and 'Status'.
However when I try to change the code and add a filter for this Toggle field it fails and hides all gallery entries.
When 'Created by' and or 'Status' contains data, it works successfully and pops up only the entries not checked by 'Document Approved'.
See the green marked part in the code underneath:

//If('TeamInc procedure requests'.'Documents approved'= false,
If(
And(
IsBlank(inpCreatedBy.Selected.Result),
IsBlank(inpStatus.Selected.Result)
),
Sort(
'TeamInc procedure requests',
'Document name',
Ascending
),
If(
And(
!IsBlank(inpCreatedBy.Selected.Result),
!IsBlank(inpStatus.Selected.Result)
),
Filter(
'TeamInc procedure requests',
And(
'Created By'.DisplayName = inpCreatedBy.Selected.Result,
Status.Value = inpStatus.Selected.Result,
'Documents approved'= false
)
),
If(
!IsBlank(inpCreatedBy.Selected.Result),
Filter(
'TeamInc procedure requests',
'Created By'.DisplayName = inpCreatedBy.Selected.Result,
'Documents approved'= false
),
Filter(
'TeamInc procedure requests',
Status.Value = inpStatus.Selected.Result,
'Documents approved'= false
)
)
)
)
//)

Please be so kind and inform me how I can solve this issue


Kind regards,

Jan

netherlands

PowerApp - Gallery filter.png

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

    @OfficeKundig 

    You cannot filter properly on a Yes/No column for false values in PowerApps with the =false statement.

     

    Please consider changing your Formula to the following:

    Sort(
     Filter('TeamInc procedure requests',
     (IsBlank(inpCreatedBy.Selected.Result) || 'Created By'.DisplayName = inpCreatedBy.Selected.Result) &&
     (IsBlank(inpStatus.Selected.Result) || Status.Value = inpStatus.Selected.Result) &&
     !'Documents approved'
     ),
     'Document name'
    ) 
    

    The above is equivalent to your prior formula but has been simplified and includes the logic for the Document approved filter.

     

    I hope this is helpful for you.

     

     

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 431

#2
WarrenBelz Profile Picture

WarrenBelz 360 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 280 Super User 2026 Season 1

Last 30 days Overall leaderboard