cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RJF61
Post Partisan
Post Partisan

Filters with Or

I am new to Power Apps but working on a SP List (Safety Good Catch Items).  As shown below, I have created a Filter Container and want to Filter records on Status OR AssignedTo (I can see that I will need additional Filters using AND in the future).  Regardless, I have the following and am trying to see...

1.  All records OR

2. Records with Status = Selected Radio Button OR

3. AssignedTo = Selected  Dropdown result 

 

Filter('Safety Good Catch Items',Status.Value = Radio2.Selected.Value || AssignedTo.Value = DrpdwnAssign.Selected.Result || Radio2.Selected.Value=Blank())

 

RJF61_0-1665690313382.png

I am not receiving the results I expect.  If I select an AssignedTo (with no Status choice), ALL records are still displayed.  I assume it is in my OR logic.  Again, another filter will soon include Status = In Process by Assigned To.

4 REPLIES 4
RandyHayes
Super User
Super User

@RJF61 

Please consider changing your Formula to the following:

Filter('Safety Good Catch Items',
    Status.Value = Radio2.Selected.Value || IsBlank(Radio2.Selected.Value) ||
    AssignedTo.Value = DrpdwnAssign.Selected.Result || IsBlank(DrpdwnAssign.Selected.Result)
)
    

 

You just need to account for the blank selection.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes Thanks for the response.  My only question is the default value for the AssignedTo is --- (not Blank).  Does that make the final OR AssignedTo.Value = ---?

RandyHayes
Super User
Super User

@RJF61 

Yes...I was wondering about that (from your picture).


So change the formula to:

Filter('Safety Good Catch Items',
    Status.Value = Radio2.Selected.Value || IsBlank(Radio2.Selected.Value) ||
    AssignedTo.Value = DrpdwnAssign.Selected.Result || DrpdwnAssign.Selected.Result="---"
)
_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes Again, thanks for the response and suggestions.  I'm still having an issue when the AssignedTo is the Filter selection.  Regardless of the AssignedTo selection, there is no change change in the records displayed.

 

I currently have...

Filter('Safety Good Catch Items',
Status.Value = Radio2.Selected.Value || IsBlank(Radio2.Selected.Value) ||
AssignedTo.Value = DrpdwnAssign.Selected.Result || DrpdwnAssign.Selected.Result="---"
)

The AssignedTo Choices (from SP) are...

---

Name 1

Name 2

etc.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (6,244)