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

Community site session details

Session Id : 6WMzgx0R99QziXXjwD/a4F
Power Automate - Building Flows
Answered

Filter a query by Yes/No column not working

Like (1) ShareShare
ReportReport
Posted on 24 Jan 2020 23:16:09 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

 

  • Suggested answer
    jrussi1301 Profile Picture
    38 on 09 May 2025 at 20:42:39
    Filter a query by Yes/No column not working
    If you create the yes/no column in a list that has already rows, the value of this column will be null for those rows. You need to set it, even if your default value is No. (check/uncheck the column for a No value on those rows).

    The default value will only apply to new rows.
     
    Only after you have checked the correct value you will be able to use :

    Column eq 0  -> to filter No rows
     
    Column eq 1 -> to filter Yes rows.
  • Suggested answer
    SaiRT14 Profile Picture
    1,988 Super User 2025 Season 2 on 30 Oct 2024 at 22:11:15
    Filter a query by Yes/No column not working
     

    Yes/No columns can’t be directly used in filter queries. 

    ApprovalID filter in the Get items action - ApprovalID eq <integervariable>

    item()?['Cancelled'] eq true
     

  • Suggested answer
    nick9one1 Profile Picture
    287 on 30 Oct 2024 at 16:37:54
    Filter a query by Yes/No column not working
    this is an incorrect answer. yes/no fields can be filtered with an odata filter by using 1 or 0 in in place of true and false. 

    e.g. 

     "Cancelled" eq 1

    will filter out all rows where cancelled doesn't equal true. 
  • Mu_Essam93 Profile Picture
    3 on 20 Jun 2024 at 14:49:35
    Re: Filter a query by Yes/No column not working

    I don't know how this bug still presets, but thank YOU

  • mongolian7 Profile Picture
    Microsoft Employee on 23 Apr 2024 at 08:51:34
    Re: Filter a query by Yes/No column not working

    This magically works! Thanks for the answer!

  • R1LDLS Profile Picture
    2 on 15 Mar 2024 at 01:40:52
    Re: Filter a query by Yes/No column not working

    4 years later, i can't believe i will get the same issue and spent hours and hours talking to ChatGPT and asking for help.  i tried different combinations: 

     

    fld eq Yes , fld eq 'Yes'

    fld eq true, fld eq 'true'

    'fld eq yes'  and so on...

    did fld ne false and it worked but that's weird though.  so, asked copilot and told me to try fld eq 1 and it worked!  🙂

     

  • RobElliott Profile Picture
    10,166 Super User 2025 Season 2 on 07 Nov 2023 at 03:25:45
    Re: Filter a query by Yes/No column not working

    It's not a secret name, it's the internal name of the column and it doesn't change. When making changes to column names you always need to check the internal name when referencing the column n JSON, Power Apps or Power Automate., This is particularly so if your column name has spaces or special characters in it as SharePoint might add something like, for example, _x0020_ which is the url  encoding for a space. Or it might strip out the space altogether. So the internal name is very important.

     

    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.

  • lcoreyl Profile Picture
    3 on 06 Nov 2023 at 23:11:50
    Re: Filter a query by Yes/No column not working

    FYI - for those troubleshooting this I ran into another PA shortcoming that compounds this one.  I found that I was using the list in MS teams and making adjustments there, but when looking at the full JSON that returns when getting the filtered list my problem was this:  There's a column name I see and can change in teams, but then there's the secret name that actually matters which is likely seen in sharepoint (I can't verify that now as i've lost access temporarily).  It decided the names like this:

    seen in teams / power automate = seen in JSON data / probably sharepoint

    responder = responder

    responder2 = responder20

    responder3 = responder2

     

    So the value for the column in the ODATA filter needs to match what is in the JSON data, not what is in teams.  this caused me a good deal of lost time troubleshooting changes to the responder2 column as me and the code disagreed which column we were talking about.

     

  • JB-10102051-0 Profile Picture
    23 on 11 Oct 2023 at 15:45:27
    Re: Filter a query by Yes/No column not working

    Filtering in PA with Yes/No Sharepoint Column is a 0 or 1 so "Yes/no Column eq 0 " would return false values and an eq 1 would return true values

  • ALVbot Profile Picture
    2 on 05 Oct 2023 at 21:11:19
    Re: Filter a query by Yes/No column not working

    Hola aunque, veo que esto es una confusion, dejo mi aporte en como lo realize:

     

    Para traer los datos con colum: falso

    Colum ne 1

    Para traer los datos con colum: Verdadero

     

     

    Colum 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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Loading complete