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 / sample Filter not working
Power Apps
Unanswered

sample Filter not working

(0) ShareShare
ReportReport
Posted on by 228

Hello Community,

 

I have a really simple filter query that doesn't work.

 

Filter(SPlist;name = varName && check = true)

 

SPlist = my sharepoint list
name = a text Field in Sharepoint list
Check = yes/no field in Sharepoint list
varName = a simple text variable

 

If I only use name or only check it works but the filter query as above does not work.

 

Does anyone have an idea why such a simple filter query doesn't work?

Categories:
  • TheRobRush Profile Picture
    11,128 Moderator on at

    Try this

     

    Filter(SPList;name = varName && check=1)

     

  • Tamer66 Profile Picture
    228 on at

    ok thank you that works now but why doesn't it work with true/false. Especially since that also works in other places. What's right here? 1/0 or true/false on a query

  • TheRobRush Profile Picture
    11,128 Moderator on at

    a true false column in sharepoint is technically 1 for true 0 for false. It will not tend to work if referencin g true & false. Not 100% sure why since I didn't write the code for the system myself BUT i think it has something to do with true and false checks if anything is present in that column at all, so if it has ever been true and then switched to false then a true query still returns it. I think this is the issue as I can create a SPList and have 5 items in it and filter vs 2 columns (one being true false) and filtering by true also returns items that are now marked false but used to be true, and leaves out items that have not been marked at all yet (this occurs when items exist from BEFORE adding the true false column so they have no default value)  whereas searching for its binary value of 1 or 0 searches for the current state of the column

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 220 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 189 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 139

Last 30 days Overall leaderboard