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

Filter data that have no relationship

Hallo Community, 

 

I have the entity employee that has a many-to-many relationship to the entity training. Now I want to create a view for my model driven app that shows all the employees without a training. 

I created a view and go to: Edit filters--> Add-->Add related entity-->select the related entity and "Does not contain data". 

Then I get the message: "Conditions cannot be added under relationships with no related data".

How can I filter such a scenario? 

 

thank you in advance

 

4 REPLIES 4
Impactful Individual
Impactful Individual

Re: Filter data that have no relationship

Hi @sandra1 

I'm unable to recreate the issue. Can you please take a screenshot of your filters?

 

Also, does it need to be a many-to-many relationship? I often find it better to have one-to-many relationships. For example, on a training app I made, rather than having a many-to-many from Employee to Training, I had a one-to-many from Employee to an entity I called Training Details and a one-to-many from Training Details to Training Course.

 

Highlighted
Helper I
Helper I

Re: Filter data that have no relationship

Hey @SKH19

 

thank you for your reply. Here are the screenshots you asked for:

Many_to_Many.PNG

This is the massage I get when I click the "ok" button:Error.PNG

 

Thank you for your idea to split the many-to-many relationship into two relationships. 

I'm not sure if I unserstood you right, but shouldn't it be a one-to-many relationship from Employee to Training Details and a many-to-one relationship from Training Details to Training Course? 

 

Highlighted
Impactful Individual
Impactful Individual

Re: Filter data that have no relationship

When working with entities I find it easier to think in terms of "Lookup" rather than "Relationship." I come from a relational database background and it takes a few tricks like that to get me thinking in entity terms.

So in my example the forms for Training Details will have Lookup columns to both Employee and Training Course. 

In essence, yes those are the types of relationships, but if you are anything like me you will find it easier to just figure out which entity is looking up to another entity and then, instead of creating a relationship in that entity, create a new field of type "Lookup" 

Highlighted
Super User
Super User

Re: Filter data that have no relationship

Hi @sandra1 

A many to many relationship is really two one to many relationships with a join table in between.  There is a good article about this for PowerApps https://powerapps.microsoft.com/it-it/blog/relate-records-in-many-to-many-relationships/  .  PowerApps can build the junction table but it is not visible.  You can do it manually however and this is helpful if you want to add additional fields to the junction table. 

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Users online (10,211)