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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Problem when trying to...
Power Apps
Unanswered

Problem when trying to create a 1-N hierarchy

(0) ShareShare
ReportReport
Posted on by 4

So I have this weird problem that when I am trying to create a hierarchical 1-N relationship from a table to itself (in my example my table is MyCompany and the relationship would be subcompany) the relationship flips to N-1 for some reason. I am pretty sure that I am doing everything right and before saving everything looks correct. But after saving is done I always get the relationship flipped for some reason. Pretty hard to use hierarchy functions and logic when I can't even make the relationship in the first place 🤔

 

Does anyone know why this is happening? Would really appreciate if someone knows how to fix this, because without hierarchy I will have to do some really ugly gymnastics to make the app work as intended 😓

Categories:
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @Mango_Loco 

    The typical way to do this would be with a second table of subcompanies linked in a One to Many relationships with company.  Another way to do this would be to create a collection of subcompanies using Collect(subcomp, Distinct(MyCompany, subcompany)), and use subcomp as the items property of a dropdown in a form. 

  • Mango_Loco Profile Picture
    4 on at

    Hi @Drrickryp 

    Yeah, I was going to use a second table for subcompanies if I can't get hierarchy to work. The problem in that is that all companies should be able to have subcompanies and users should see subcompanies depending on what kind of role they have in the app. So a user might need to see companies in multiple layers. Companies are also something that will be added later, so I can't really know how many layers the app will have for example next year.

     

    With 1-N hierarchy I should be able to pretty much just use Under function and that would do everything without any hassle no matter how many layers will be added later. So for that reason I would like to know why 1-N relationships in my tables are rotating constantly 😫

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 352 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 323

#3
Mohsin Ali Profile Picture

Mohsin Ali 226

Last 30 days Overall leaderboard