cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Microsoft
Microsoft

Get items filter query using boolean

Hi all,


I'm trying to use a filter query to filter my Get Items (from Sharepoint) step.  The column i'm trying to use for the filter is a Yes/No.  I've tried Columnname eq false, Columnname eq 'false', 

equals(item()?['Columnname'], json('false')), Columnname eq 0, tried a Filter array, etc.  I'm struggling to get my filter to work no matter what I try.  Any suggestions?
 
Thanks in advance
7 REPLIES 7
Highlighted
Resident Rockstar
Resident Rockstar

Re: Get items filter query using boolean

Hi @russrimm 

 

Can you please post a picture of (or a C&P) of the JSON from Get Items and the value that relates to your " Columnname"?

 

If you find my posts helpful, please mark with thumbs up

 

Any questions, just ask.

 

Thanks, Alan


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


Highlighted
Microsoft
Microsoft

Re: Get items filter query using boolean

Thanks Alan, the column i'm trying to filter in is called "ClosedOut"

closedout.PNG

Highlighted
Resident Rockstar
Resident Rockstar

Re: Get items filter query using boolean

Hi @russrimm 

I haven't tested this but at a glance, it looks as if it should be: 

equals(item()?['ClosedOut'], 'false')

or

equals(string(item()?['ClosedOut']), string('false'))

Please give them a try and see if any improvement.

 

If you find my posts helpful, please mark with thumbs up

 

If this solves your issue, please click "Accept as Solution"

 

Any questions, just ask.

 

Thanks, Alan


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


Highlighted
Microsoft
Microsoft

Re: Get items filter query using boolean

Thanks again Alan,

One more confusion for me - i've got a couple of other filters with it which are working (Event Date gt and lt a specific date).  How do I integrate this additional filter into that?  Tried both of your suggestions a few different ways, with and without the and ClosedOut eq, with and without the ' ' around it, etc.  I keep getting a lot of Column 'false' does not exist.

Capture.PNG

Thanks again

Highlighted
Resident Rockstar
Resident Rockstar

Re: Get items filter query using boolean

Hi @russrimm 

 

Some of what I posted there wouldn't slot right into a filter query, please consider the below:

Where I have interested the dates above, please add your own using your adddays & utcNow with no single inverted commas.

 

Event_x00200_Date gt 2019-10-22T-00:00:00Z AND Event_x00200_Date lt 2019-10-29T-00:00:00Z AND ClosedOut eq 'false'

Please let me know how you get on?

 

If you find my posts helpful, please mark with thumbs up

 

If this solves your issue, please click "Accept as Solution"

 

Any questions, just ask.

 

Thanks, Alan


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


Highlighted
Microsoft
Microsoft

Re: Get items filter query using boolean

Thanks Alan,

I tried adding a new get items step and added only ClosedOut eq 'false' by itself and it ends up returning all records whether ClosedOut is true or false.  I also tried it without the single quotes.

Highlighted
Resident Rockstar
Resident Rockstar

Re: Get items filter query using boolean

Hi @russrimm .

 

From memory, it may be the case that Filter query doesn't handle the boolean very well (I may be wrong, been a while) so I'd advise for this one, filter query on your dates then add a condition to test ClosedOut after that.

 

In the mean time, I will look to recreate by creating a list with a boolean and some dates and report back but if it were I, and the filter query wasn't working, just pop a condition after the get items using the code I mentioned initially and it will only pass the condition in line with what you tell it to.

 

If you find my posts helpful, please mark with thumbs up

 

Any questions, just ask.

 

Thanks, Alan


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Come join us today! Find your favorite faces from the community presenting at the Power Platform Community Conference!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Users online (3,027)