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 using T...
Power Apps
Answered

Filter Gallery using Toggle results

(0) ShareShare
ReportReport
Posted on by 209

Hello,

I have a sharepoint list which holds data collected from a powerapp.  One of the columns in the sharepoint list is named 'Assessment' and the results in this column are patched in from a toggle switch.

I am trying to generate a gallery on another screen which only filters records from that list which are true but I can get it to work.  The 'true' results show in the sharepoint list as Yes though I have altered my formula to test this and nothing works.  I am relatively new to designing powerapps so it could be something simple but i'm really stuck.

My sharepoint list is named 'DriverLeavers' and the column I am trying to pull in and filter is names 'Assessment' I have tried using....

'Filter(DriverLeavers,Assessment="Yes")'

'Filter(DriverLeavers,Assessment=true)'

Both of these just display every record held in the sharepoint list in the gallery

Categories:
I have the same question (0)
  • mdevaney Profile Picture
    29,991 Moderator on at
    To diagnose your issue I must ask a preliminary question: did you check to see if the PATCH was successful?

    Now that we are sure the data was successfully patched did you refresh your datasource after the patch? Try this:

    Filter(DriverLeavers,Assessment=True);
    Refresh(DriverLeavers);

    Note: there is an upper case T in True.

    Let me know if this works for you or if it fails.

    —-
    Please Accept as Solution if this post answered your question so others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.
  • Station1901 Profile Picture
    209 on at

    Hi mdevaney,

    Thanks for getting back to me. The patch is fine but unfortunately it didn't work with 'True' or lowercase 't'

     

    thanks

  • mdevaney Profile Picture
    29,991 Moderator on at
    @Station1901
    Did you use the Refresh statement after PATCH as I have suggested in my previous post?

    Filter(DriverLeavers,Assessment=True);
    Refresh(DriverLeavers);
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @Station1901 

    There is a well known bug related to SharePoint True/False columns.  If you change it to single line of text, it works as you wish. Alternatively, there are work arounds using collections. https://powerusers.microsoft.com/t5/Building-Power-Apps-Formerly/Filter-will-not-filtering-properly-with-Sharepoint-list-boolean/m-p/159405#M53730  @Shanescows recent video on ForAll() and Patch() shows this workaround as well. https://www.youtube.com/watch?v=0xZ4fMJbLvk 

  • Station1901 Profile Picture
    209 on at

    Yes, I've used the refresh statement.  Also, The patch is in a separate part of the app (different screen & activated with a button).  I assumed my gallery would work from the existing data in the sharepoint list 'DriverLeavers'? - It's still not working

  • Verified answer
    v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @Station1901 ,

    Could you tell me the data type of Assessment?

    If it is a yes/no data type, then please refer what he said @Drrickryp 

    It is a known issue that you can not use ""true/false" to filter a yes/no data type in sharepoint list.

    For now, I suggest you use 1/0 to filter this kind field.

    Using "1" to filter items are true.

    Using "0" to filter items are false.

    For example: 

    Filter(DriverLeavers,Assessment=0)    //false items

    Filter(DriverLeavers,Assessment=1)   //true items

     

     

     

    Best regards,

  • Station1901 Profile Picture
    209 on at

    The data type is Yes/No.  I have used the 1/0 as you have suggested and my gallery now works perfectly.  Thankyou!!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
wolenberg_ Profile Picture

wolenberg_ 119 Super User 2026 Season 1

#2
WarrenBelz Profile Picture

WarrenBelz 107 Most Valuable Professional

#3
Haque Profile Picture

Haque 103

Last 30 days Overall leaderboard