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
Highlighted
Super User
Super User

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 @SeanHenderson

 

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
Super User
Super User

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 III
Super User III

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

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

Users online (6,688)