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

 

@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
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Users online (4,789)