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 / Missing IsRelated() Fu...
Power Apps
Answered

Missing IsRelated() Function? Table Relationship Issues

(0) ShareShare
ReportReport
Posted on by 176
I have been facing a lot of issues when interacting with many-to-many related Dataverse tables within PowerApps. Mainly, that I am running into a lot of issues when trying to reference relationships in iterating functions like Filter() and ForAll(). I have attempted to simplify the environment I'm working with, just to figure out how to accomplish what I'm looking for: I want to be able to tell if I record is related to multiple other records.
 
While seemingly straightforward, I keep running into the error of: The specified column is not accessible in this context. whenever I try to reference these relationships.
 
In my example, I have three tables, People, Fruit, and Hobbies, with People being related many-to-many to the other two (Fruit and Hobbies are not related).
 
After creating a few relationships with galleries and Relate(), I was able to see things like what fruits are liked by selected people, and what people like what hobbies with simple relationship accessors inside of galleries with statements like
PeopleBox.Selected.Fruit, HobbiesBox.Selected.Peopleetc. These return very straightforward tables of related records:
 
 
However, I cannot figure out how to do something like simply making a table of all people who are related to two selected records. Since it would no longer be the people related by a single relationship accessor (if anything would be the intersection between the two resulting tables), my thought was to filter all people by if these relationships exist. However, there for some reason is a missing IsRelated() function, that would help tremendously for things like this. My next thought was to instead use record GUID's, and simply filter based on if the current record's GUID matches those referenced within the selected Fruit and Hobbies referenced People:
 
 
Unfortunately, this doesn't evaluate correctly because I'm also running into issues using LookUp() on relationship columns:
 
 
These should both evaluate to the same value; they both reference the People record with name Billy, but for some reason the LookUp() statement returns blank.
 
Here's another example of where I run into the non-accessible message I mentioned previously:
 
I expected that this ForAll() statement would return a single-column table of tables, each corresponding to a single Fruit's related People records. 
 
It seems like I'm either navigating these relationships entirely wrong or they aren't fleshed out in PowerFX. Any tips would be awesome!
I have the same question (0)
  • Kalathiya Profile Picture
    2,456 Super User 2026 Season 1 on at
    Hello @BenKraft
     
    For relationship tables, never compare by text fields (Name, Email, etc). Always compare by the record’s GUID. Every Dataverse record has a stable ID (for People it’s typically PeopleId). So assumed your People table have PeopleId unique column.
     
    So instead of trying to match on Name do this:
    With(
        {
            FruitPeople: FruitBox.Selected.People,
            HobbyPeople: HobbiesBox.Selected.People
        },
        Filter(
            People,
            PeopleId in FruitPeople.PeopleId && //PeopleId - Please update with your column name
            PeopleId in HobbyPeople.PeopleId
        )
    )
    
    This returns only the people that exist in both relationships.
     
    ---------------------------------------------------------------------------------
     
    📩 Need more help? Mention @Kalathiya anytime!
    ✔️ Don’t forget to Accept as Solution if this guidance worked for you.
    💛 Your Like motivates me to keep helping!
  • BenKraft Profile Picture
    176 on at
    @Kalathiya Thanks for the response,
     
    I understand the importance of using GUID in my lookups, that's what I included in my first example, using the GUID (column with the name as the table, in this case "People"). Is there any reason other than clarity you are using With() here? Could you theoretically use those statements "in-line"?
     
    Purely for the sake of argument, however, is there any reason you can think of why this statement evaluates to blank?
     
    LookUp(FruitBox.Selected.People, ThisRecord.PeopleID = First(FruitBox.Selected.People).PeopleID)
     
    From my perspective, this is guaranteed to find a record / ID, since it searches for a record that comes from the table itself.
  • BenKraft Profile Picture
    176 on at
    @Kalathiya It also seems strange to me that you seemingly can't act on these relationships iteratively; while sometimes the relationships can be referenced directly as tables, other times they can't be accessed:
     
     
    Is it really not possible to count the number of relationships to another table for each record?
  • Kalathiya Profile Picture
    2,456 Super User 2026 Season 1 on at
    @BenKraftWith() is just for readability and to avoid repeating the same expressions. Logic works the same if you write everything inline.
     
    FruitBox.Selected.People looks like a normal People table, but it isn’t. It’s actually a relationship (N:N) table created by Dataverse. Each row is a “link” between Fruit and a Person, not a real People record. Power Apps just shows the People fields on top of those link rows. Based on your lookup formula, even though both sides look like the same PeopleID, they are coming from different layers (one from the link row, one from the related People record). Because of that, Power Apps doesn’t see them as equal, and the lookup returns blank.
     
    But you can use original table and use the relationship only to get the IDs, like this:
     
    If you want all matching people (for example, everyone who is linked to both Fruit and Hobbies), then Filter() then:
    Filter(
        People,
        PeopleId in FruitBox.Selected.People.PeopleId &&
        PeopleId in HobbiesBox.Selected.People.PeopleId
    )
    
    This returns a table of records.
     
    If you only want one person (for example, the first match), then you can use LookUp() on the base People table, like this:
    LookUp(
        People,
        PeopleId in FruitBox.Selected.People.PeopleId &&
        PeopleId in HobbiesBox.Selected.People.PeopleId
    )
    
    Both Filter and LookUp function will run against Table not a Relationship.
     
    For count, you just have to do it from the base tables, not from the relationship field itself.
     
    AddColumns(
        People,
        FruitCount,
        CountRows(
            Filter(
                People_Fruit,   // relationship table
                PeopleId = ThisRecord.PeopleId
            )
        )
    )

     
    If this response resolves your issue, please mark it as the Verified Answer so it can help other community members as well.
     
  • BenKraft Profile Picture
    176 on at
    @Kalathiya I think I see what you're saying, since the First() function effectively "extracts" the real People record from the FruitBox.Selected.People expression, the join table record GUID and the People record GUID's would not match?
     
    I'm learning my issues stem more from when I'm doing nested iteration:
     
    You mention People_Fruit as the relationship table. How can I access that? I feel like that would solve a lot of my issues I'm running into. For example, in the snippet above, I'm effectively trying to "expand" the relationships between 'Assembly - Z-MAX Defect Levels' and 'Assembly - Z-MAX Components', which I'm imagining is just what the join table is.
     
    I peeked into the Dataverse relationship and found
     
    but I can't reference it from within the app or Data pane.
  • Kalathiya Profile Picture
    2,456 Super User 2026 Season 1 on at
    @BenKraft, Please refer to the tutorial below on managing relationships. It will really help you understand how relationships work and how to expand them.
     
     
    If this response resolves your issue, please mark it as the Verified Answer so it can help other community members as well.
  • Verified answer
    BenKraft Profile Picture
    176 on at
    @Kalathiya Thanks for the video, some portions were very helpful.
     
    The most crucial part of the video is the section starting at 47:30; he mentions that in order to allow for the iteration of many-to-many relationships YOU NEED TO TURN ON AN EXPERIMENTAL FEATURE. You can find it here in settings: 
     
    With this, using ForAll(), AddColumns(), etc. on records (as long as they reference shorter tables) works perfectly fine.
  • Kalathiya Profile Picture
    2,456 Super User 2026 Season 1 on at
    @BenKraft, Yes, this feature is still experimental. It is still in testing and is not recommended for production.
     
    If this response resolves your issue, please mark it as the Verified Answer so it can help other community members as well.

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard