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

Exclude rows from gallery to a combo box

I have two sharepoint list,  MasterList and UserList
MasterList and UserList has EmpID as the unique and foreign key.

 

The goal is for my Combobox to filter all UserList who has a Role = Staff and exclude all MasterList rows that are in my UserList Gallery.

See my code below the first filter until role=staff is working but not sure what to do after the 'And' operator. (It should filter out all UserListthat are found in MasterList using EmpID.

Filter(MasterList,Role="Staff" && )

So if I have Item 1 in my UserList it will already be excluded from my combobox MasterList .

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Power Apps
Power Apps

Re: Exclude rows from gallery to a combo box

You can use the in operator (and the Not or ! operator), in an expression like the following:

Filter(
    MasterList,
    Role = "Staff",
    Not (EmpID in UserList.EmpID))

Hope this helps!

View solution in original post

Highlighted
Microsoft
Microsoft

Re: Exclude rows from gallery to a combo box

Hi@nagestiada,

Based on the issue that you mentioned, do you want to exclude all the records within the 'MasterList' if their roles are "Staff" and exist in the 'UserList'?

Could you please share a bit more about the scenario:

  1. Is the ComboBox populated with the 'Role' column or anything else?
  2. The 'Role' is a Text column, right? Combine that the formula you provided, it should be a Text type

Let me confirm it with you again, you want to exclude all the employees in 'UserList' that can be found in 'MasterList'. And you want to exclude them from the 'MasterList'. Also, these employees are "staff".

I assume that you want to filter all the items satisfying the "Staff" and "Could not be found in the 'MasterList'" at the same time.

Please check if the above need is what you want.

I have a test on my side, please take a try as below.

Set the Items property of the Gallery as below:

 

Filter(MasterList,Role="Staff" && !(EmpID in UserList.EmpID))

 

Best Regards,

Qi

View solution in original post

2 REPLIES 2
Highlighted
Power Apps
Power Apps

Re: Exclude rows from gallery to a combo box

You can use the in operator (and the Not or ! operator), in an expression like the following:

Filter(
    MasterList,
    Role = "Staff",
    Not (EmpID in UserList.EmpID))

Hope this helps!

View solution in original post

Highlighted
Microsoft
Microsoft

Re: Exclude rows from gallery to a combo box

Hi@nagestiada,

Based on the issue that you mentioned, do you want to exclude all the records within the 'MasterList' if their roles are "Staff" and exist in the 'UserList'?

Could you please share a bit more about the scenario:

  1. Is the ComboBox populated with the 'Role' column or anything else?
  2. The 'Role' is a Text column, right? Combine that the formula you provided, it should be a Text type

Let me confirm it with you again, you want to exclude all the employees in 'UserList' that can be found in 'MasterList'. And you want to exclude them from the 'MasterList'. Also, these employees are "staff".

I assume that you want to filter all the items satisfying the "Staff" and "Could not be found in the 'MasterList'" at the same time.

Please check if the above need is what you want.

I have a test on my side, please take a try as below.

Set the Items property of the Gallery as below:

 

Filter(MasterList,Role="Staff" && !(EmpID in UserList.EmpID))

 

Best Regards,

Qi

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

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.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

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