cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
markbraley
Level: Powered On

Unable to filter with "=" operator

I'm trying to apply a filter to the Browse Screen, but the syntax I'm using keeps coming back with an "invalid arguement" and/or "invalid name" message.

I'm trying to filter on a selection column from the SharePoint list.  The column is called "Status" and the selection choices are "Approved" or "Denied."  I'm trying to exclude records that have already been approved.  So, here's the syntax I used in the Data Items field:

Filter('Leave Request', Status ! "Approved")

 

To test the syntax, I tried filtering on records that were equal to "Approved," but got the same errors.

 

Do I have to do something different because the column contains a choice field?

 

Thank you in advance for any help you can offer.

Mark

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Meneghino
Level 10

Re: Unable to filter with "=" operator

Try to place a . (a dot) after the name of the field, so Status. and see if the editor suggests something like Value
Thsi may be the added piece to deal with choice fields.

View solution in original post

7 REPLIES 7
Power Apps Staff SpencerLynn
Power Apps Staff

Re: Unable to filter with "=" operator

The operator for "not equals" is "<>".

 

I think the following should work:

 

Filter('Leave Request', Status <> "Approved")
markbraley
Level: Powered On

Re: Unable to filter with "=" operator

Thank you for getting back to me, SpencerLynn.  That didn't work either.  It won't accept any operator (=, !, <>, etc) that I know of.  I think I have to use another syntax because the field is a drop-down list of options.  I'm still digging around for other ideas.

Thanks, though.

 

Highlighted
Meneghino
Level 10

Re: Unable to filter with "=" operator

Try to place a . (a dot) after the name of the field, so Status. and see if the editor suggests something like Value
Thsi may be the added piece to deal with choice fields.

View solution in original post

Power Apps Staff SpencerLynn
Power Apps Staff

Re: Unable to filter with "=" operator

What type of field is Status? I wrote the expression thinking it was a String.

markbraley
Level: Powered On

Re: Unable to filter with "=" operator

Yes!!  That worked!  It was actually a combination of your suggestion (to add .value) and SpencerLynn's correction to use <> for not equal to.  It's working like I had wanted.  Thank you, to both of you!!!  Greatly appreciated.

Mark

Jasonkatz424
Level: Powered On

Re: Unable to filter with "=" operator

Awesome point, this just helped me a lot.

ojack21
Level: Powered On

Re: Unable to filter with "=" operator

May I ask as continuation to this one...

 

'<>' is working when used for Filter, but

'=' is not, returns nothing at all.

 

I used this for graphs and pie charts, the charts are showing if I use '<>', but the chart is blank if i use '='

 

thoughts?

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (5,014)