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

How do I have an Or in a Filter()?

I have a label that recognizes the user: Office365Users.MyProfile().JobTitle and then I also have a hidden label that says "All Roles".  So, when a user accesses the app, I want the gallery to display all the items that are available to their role or all roles... and then I want them to be able to search within that.

 

Here's what I have the gallery set to:

Filter(ListName,ColumnName.Value in CurrentUsersLabel.Text Or AllRolesLabel.Text && searchbox.Text in Title)

 

It only returns the first logical test instead of both. Thoughts?

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: How do I have an Or in a Filter()?

@Jeannie_H 

 

Filter(ListName, (CurrentUsersLabel.Text in ColumnName.Value || AllRolesLabel.Text in ColumnName.Value) && searchbox.Text in Title)

 

ColumnName.Value - What type of column is this columnname?

Is it choice? - what values are part of this? is this multi select?

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

View solution in original post

3 REPLIES 3
Dual Super User
Dual Super User

Re: How do I have an Or in a Filter()?

@Jeannie_H 

 

Filter(ListName, (CurrentUsersLabel.Text in ColumnName.Value || AllRolesLabel.Text in ColumnName.Value) && searchbox.Text in Title)

 

ColumnName.Value - What type of column is this columnname?

Is it choice? - what values are part of this? is this multi select?

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

View solution in original post

Jeannie_H
Level: Powered On

Re: How do I have an Or in a Filter()?

@RezaDorrani, So simple! Thank you! Right now, the column is a single-selection drop-down, but it needs to be a multi-selection. I've been researching how to first even display the multi-selection choices in the gallery and haven't made it that far yet. Suggestions?

Dual Super User
Dual Super User

Re: How do I have an Or in a Filter()?

@Jeannie_H 

 

It is little tricky

 

https://www.youtube.com/watch?v=44j2VRbdWjk

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 192 members 6,319 guests
Please welcome our newest community members: