web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Filter a query by Yes/...
Power Automate
Answered

Filter a query by Yes/No column not working

(1) ShareShare
ReportReport
Posted on by

Hi everyone,

 

Hope you are having a good day!

 

I am creating a flow that will get items from a sharepoint list with this filter on the query:

 

I've tried both,

ApprovalID eq <integervariable> and Cancelled eq 'true' 

 

@yashag2255 hope you can help.
@RobElliott 

and

 

ApprovalID eq <integervariable> and Cancelled eq true 

 

but neither seems to work since the query gets the item with the correct integer value but does not take into consideration the second query filter I've used, the 'Cancelled' column is a Yes/No Column in Sharepoint.

 

I'm patching the column "Approved" in Powerapps and after the patch, the do until of my flow stops even though there is no "Cancelled" eq true.

 

 

 

image2.PNGimage1.PNGimage3.PNG

 

Categories:
I have the same question (0)
  • Verified answer
    RobElliott Profile Picture
    10,325 Super User 2025 Season 2 on at

    @Anonymous filter queries don't like Yes/No columns. You can put the ApprovalID in to the filter query but then you'll need a condition to check for Cancelled is equal to true.

    Rob
    Los Gallardos
    If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.

  • Community Power Platform Member Profile Picture
    on at

    I have successfull used a filter query in a Get Items action.  The column being tested for is: Details.  When I wanted to bring in items whose value of Details = No, my filter query is:  

    Details eq 'false'

    The key is the use of single quotes around either 'true' or 'false'

  • JoshuaGWilson Profile Picture
    58 on at

    When its a Yes/No field you want to filter query it for when its true you use the not equal to operator "ne" and not "eq".

     

    Example1: Cancelled ne false

     

    Example2: ApprovalID eq <integervariable> and Cancelled ne false

     

  • anseljh_align Profile Picture
    11 on at

    Thanks, @JoshuaGWilson, this absolutely worked.

     

    It's also absolutely crazy that the equality operator is broken. 😬

  • cyberjamus Profile Picture
    44 on at

    "eq" is not broken 🙂

     

    "Cancelled ne false" does not actually work, this filter statement will always evaluate as True, whether the column is set to Yes or No, as none of the Cancelled column values will have the value of "false"...

    I.e. the Output will show Items where Cancelled is set to Yes and it will also show items where Cancelled is set to No.

     

    Yes/No Columns must be evaluated as 1/0.

     

    For your use case it would be:

    Cancelled eq 1

     

    Filtering with "Cancelled eq 1" will show all items with Cancelled column value set to Yes.

     

    Test it out with a simple Test List with few rows before using it in Production.

  • i_power Profile Picture
    76 on at

    agree with @cyberjamus - we have many yes/no columns and use queries like:

    Column eq 1

     

  • mrodriguezg Profile Picture
    27 on at

    Totally true, worked for me! Thanks

  • dhanal Profile Picture
    2 on at

    This is driving me crazy.

    When I set the column eq 1 it works perfect but not when column eq 0.

     

    dhanal_1-1611267992366.png

    dhanal_2-1611268058072.png

     

     

     

  • LostLogic Profile Picture
    28 on at

    This is an old topic, so, I'm sorry to dredge it up. But here is the reason:

    If a document has not been tagged with NotifiedFinance = Yes, then the NotifiedFinance tag isn't set in the document metadata (If you download the data from Get Items (Properties) you'll see it's missing from all the documents where the tag has never been set.

     

    Examples:

    Doc1.docx has been set with NotifiedFinance to Yes -> Tag is added for NotifiedFinance to it's metadata with value 1.

    Doc2.docx has not been set with NotifiedFinance to Yes -> No tag on the document or metadata.

    Doc3.docx has been set with NotifiedFinance to Yes, but later was changed to No -> The NotifiedFinance tag exists in the Metadata of the document with a value of 0.

     

    I'm not sure why SharePoint doesn't add "null" state values when tags are added, but that is the reason why it's not showing up when you try to set it to eq 0. Setting it to not equal, ne 1, will get all documents that are set to 0 (In theory)

     

    Edit: Clarification of initial sentence

  • Community Power Platform Member Profile Picture
    on at

    Please use 1 for true and 0 for false instead of Yes/No or True/False

    E.g :- Cancelled eq 1

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard