Showing results for 
Search instead for 
Did you mean: 
New Member

Filter one table by another table (i think!)

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



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.






Resolver III
Resolver III

@monatech ,


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



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" } )

Helpful resources

PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!


Are Your Ready?

Test your skills now with the Cloud Skill Challenge.


Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (44,118)