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

Relate function for Many to One

I am having issues with the Relate function, and can't figure out where I am going wrong. I don't have any trouble when using a N:N relationship, but can't get N:1 to work.

 

I have a Meeting table and an Organization table, with a Many to One relationship between them. Each Organization can be related to multiple Meetings.

In PowerApps I am trying to connect a selected Meeting with a selected Organization, but am getting an error on my Relate formula "The first argument of Relate or Unrelate must refer to a 'to many' relationship"

 

My Relate is as follows

 

Relate(ComboBox4.Selected.ConnectedOrganization, ComboBox5.Selected)

 

 

 
1 ACCEPTED SOLUTION

Accepted Solutions
MayankP
Responsive Resident
Responsive Resident

Hi @jawalley 

 

your syntax should be like this..

 

In this case relationship is from Account -> TempEntity (one to Many), meaning one account can have multiple child temp entity records

 

Relate(Dropdown1.Selected.TempEntities,Dropdown2.Selected)

 

(dropdown 1 is list account and dropdown 2 is list of temp entity records)..

 

MayankP_0-1647880695720.png

 

for more information refer -> https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-relate-unrelate

 

View solution in original post

3 REPLIES 3
MayankP
Responsive Resident
Responsive Resident

Hi @jawalley 

 

your syntax should be like this..

 

In this case relationship is from Account -> TempEntity (one to Many), meaning one account can have multiple child temp entity records

 

Relate(Dropdown1.Selected.TempEntities,Dropdown2.Selected)

 

(dropdown 1 is list account and dropdown 2 is list of temp entity records)..

 

MayankP_0-1647880695720.png

 

for more information refer -> https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-relate-unrelate

 

jawalley
Frequent Visitor

@MayankP 
Okay, so it looks like my formula was backwards. The "One" should be the first argument and the "Many" the second. Making that adjustment I got the Relate function to work. However because that doesn't specify the lookup column in the "Many" table, I have another issue. 

 

I have two relationships between "People" and "Meetings". A 1:N relationship called "Primary" and a N:N relationship. How can I use the Relate function to relate a "Person" to the "Primary" field in a "Meeting"? 

The Relate function works if I only have the 1:N relationship, but does not work when I also have a N:N relationship between the two tables. 

 

I am currently getting the error "The function 'Relate' has some invalid arguments. 

 

jawalley_0-1647887940653.png

 

 

jawalley
Frequent Visitor

I have reposted my more specific question here https://powerusers.microsoft.com/t5/Microsoft-Dataverse/Relate-function-multiple-relationships-betwe...

since @MayankP did answer my original question

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (2,978)