cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Jota90
Frequent Visitor

Filter a table with existing values in a collection

Hi!, 

 

I've searched a lot but can't find a way to do this.

I work with sharepoint lists.
I have the following tables:

  • Events (Title, Category*, Employee*) //Employee User Created by
  • Categories (Title)
  • Employees-Categories(Employee*, Categories*) // The Categories column can select multiple values

 

I want to filter the Events table based on the Categories assigned to the Employee.

 

I have tried to do:
1. App.OnStart:

Set(colCategoriesEmployee; Filter('Employee-Categories';Employee.Email = User().Email).Categories)

 

2. Gallery.Items:

Filter(Events, Category in colEmployeeCategories.Categories)

... also

Filter(Events, Category.Id in colEmployeeCategories.Categories.Id)


... also many other tests but I can't.

 

Can somebody help me?

 

Thank you!!!

 

1 ACCEPTED SOLUTION

Accepted Solutions
Jota90
Frequent Visitor

 

Hi!, I have found a way that works for me, maybe there are others...

 

1. App.OnStart

Set(_EmployeeCategories; Concat(First(Filter('Employee-Categories';Employee.Email = User().Email)).Categories;Value;" "))

 

2. Gallery.Items: 

Filter(Events; Category.Value in _EmployeeCategories)

 

 

Greetings

View solution in original post

1 REPLY 1
Jota90
Frequent Visitor

 

Hi!, I have found a way that works for me, maybe there are others...

 

1. App.OnStart

Set(_EmployeeCategories; Concat(First(Filter('Employee-Categories';Employee.Email = User().Email)).Categories;Value;" "))

 

2. Gallery.Items: 

Filter(Events; Category.Value in _EmployeeCategories)

 

 

Greetings

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.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

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 (4,266)