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
Solved! Go to Solution.
The operator for "not equals" is "<>".
I think the following should work:
Filter('Leave Request', Status <> "Approved")
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.
What type of field is Status? I wrote the expression thinking it was a String.
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
Awesome point, this just helped me a lot.
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?
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
261 | |
130 | |
86 | |
85 | |
68 |