web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / One-to-Many relation b...
Power Apps
Answered

One-to-Many relation between Datacards

(0) ShareShare
ReportReport
Posted on by 233

Hello,

I am working on a Directory and have trouble with a one-to-many relation within an edit form. We hare around 50 different Job Titles in our Dept, but these can be broken down into 10 groups. What I am trying to do is have datacard1 with a drop down in it that will have the 10 Title Groups. Once selected it will filter the 50 Titles in the datacard2 into the ones that only fall into that group. I am currently using a collection to create the relation between the Titles and Groups. Please let me know if it is possible to get this process working, or if I need to change or split the collection into two.

Collection Example

ClearCollect(
 TitleCollection,
 {Title: "Title 1", Group: "Group 1"},
 {Title: "Title 2", Group: "Group 3"},
 {Title: "Title 3", Group: " Group 1"},
 {Title: "Title 4", Group: " Group 2"},
 {Etc….}, 	
 {Title: "Title 49", Group: "Group 9"}, 
 {Title: "Title 50", Group: "Group 3"}
)

 Example of the desired results

Chrisguff12_0-1667399147543.png

 

Categories:
I have the same question (0)
  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Chrisguff12 

    I would do it with two Dropdown controls.  In the first Dropdown control for groups have its Items property as 

    Sort(Distinct(TitleCollection, Group),Result)

    For the second dropdown 

     

    Sort(
     Distinct(
     Filter(
     TitleCollection, Group=Dropdown1.Selected.Result
     ),Title
     ), Result
    )

     

     

  • Chrisguff12 Profile Picture
    233 on at

    @Drrickryp 

    Such a simple and Elegante solution that works beautifully. The order of the items in the group were mixed up but I just added ", Ascending" after Result in both dropdowns and everything lines up. Thanks once again for your help.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard