web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filter one table by an...
Power Apps
Unanswered

Filter one table by another table (i think!)

(0) ShareShare
ReportReport
Posted on by 3

Hi Everyone,

 

I have spent all day trying to figure this out but keep hitting a brick wall. I hope that someone can help.

 

Essentially what I want to do is this.

 

Assign a course to a department

Assign a User to a department

Assign a User to a course

Display or highlight courses that user is assigned to when their name is selected

 

Normally, I would create these apps using SharePoint Lists, and I feel it would work using them, but I decided to explore the dataverse and have created all the necessary tables and applied the relationships to them.

 

So I have a screen like this

 

monatech_0-1617040636443.png

On the top left I have a department select, when selected it filters the Employee gallery on the left with the employees in that department - this is working fine

 

It also shows the all the courses available to that department in the next gallery, also working fine

 

Finally, I want to be able to Select a name on the left and highlight in the "Available Courses" gallery courses that they have already been assigned to.

 

The code I have been using and thought would work is this

 

If(ThisItem.Name in TrainingLinkTable.Training.Name,true,false)

 

but it all returns false, If I hard code the table in, instead of TrainingLinkTable.Training.Name it works.

 

The TrainingLinkTable in this case is a collection, but I have directly to the table as well and it does work.

 

It should also be noted that the TrainLinkTable is a link table in a many-many relationship between Courses table and Employees table

 

So a course can have many employees and an employee can do many courses.

 

Would really appreciate if someone could help guide me in where i am going wrong with this.

 

Thanks

 

Ronan

 

Categories:
I have the same question (0)
  • Bilakanti Profile Picture
    1,226 on at

    @monatech ,

     

    You can use the below code on Template Fill property of the Available Courses gallery.

    Bilakanti_0-1617074853918.png

     




    I have created temporary collections to reproduce your issues. Below are those collections

    ClearCollect( colDepartments, {DeptName: "I.T.Department"} ); ClearCollect( colDepartmentEmployees, { Name: "Karthik", Department: "I.T.Department" } ); ClearCollect( colAvailableCourses, { CDepartment: "I.T.Department", Name: "Karthik", CourseName:"PL-900" }, { CDepartment: "I.T.Department", Name: "Karthik", CourseName:"PL-100" }, { CDepartment: "I.T.Department", Name: "John", CourseName:"Essential Skillz:Evacuation Procedures" } )

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 762

#2
11manish Profile Picture

11manish 640

#3
Valantis Profile Picture

Valantis 548

Last 30 days Overall leaderboard