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 / Canvas Apps Nested Gal...
Power Apps
Answered

Canvas Apps Nested Galleries When They are Master Detail (Circular Reference)

(0) ShareShare
ReportReport
Posted on by 11

I have a Gallery which is displaying Parent Table (Absences)

 

Inside for every row I created a detail Gallery which shows Record From a Child Table (Absense Approvals)

So far it looks easy, I use this formula in the child Gallery:

 

Filter('Absence Approvals', 'Absence Approvals (Views)'.'All Absence Approvals', Absence = Future_Vacations_Gallery.Selected)

 

But I get the error of "This formula creates a circular reference between properties.

I don't know, it looks like a bug, cause I am not referencing this Gallery I am referencing the parent one.

 

I even tried to store the value of the selected Item from parent gallery in a variable and try to lookup here, But I have no idea how to do that, since this is a LookUp column and I failed filtering it.

 

Categories:
I have the same question (0)
  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @MattFreeman ,

     

    Please post the formulas in text, so that we can easily modify on them.

     

    Anyway, the formulas you need please try below:

    Filter(Filter('Absence Approvals', 'Absence Approvals(Views)'.'All Absence Approvals'), Absence = ThisItem.Absence)

     

    Best regards,

  • MattFreeman Profile Picture
    11 on at

    Thank you @v-jefferni 

     

    Sure, for future I will always write the code in text, (my bad)

     

    But the solution you offered did not help in this matter.

    You see the parent Gallery is already of type Absence, so I should use the "Selected" property.

    Yet this also didn't help.

    I rewrite the question in a better form for others as well.

  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @MattFreeman ,

     

    For the main Gallery, it includes Absences I presume a Text column. Then in this Gallery, you placed a sub-Gallery for each item, so the sub-Gallery filter should base upon a specific value as criteria. There shouldn't be and "selected" because each row of the main Gallery has a value of absence, no need to select. The ThisItem property means the row of main Gallery. So, ThisItem.Absence represents the Absence of current row of the main Gallery.

     

    Maybe I write the formula as below would be more specific:

    Filter(Filter('Absence Approvals', 'Absence Approvals(Views)'.'All Absence Approvals'), (Absence column name of 'Absence Approvals' table) = ThisItem.(Absence column name from Absence table))

     

    Note that the two columns should be Text type with my assumption. If either of them is not, the formula will be different.

     

    Best regards,

  • Verified answer
    MattFreeman Profile Picture
    11 on at

    At the end, using Selected property on Parent did not work at all.

    What actually worked, was to use a TextLabel in the grid, how? 

    This is the final formula for the detail gallery:

    Filter('Absence Approvals', 'Absence Approvals (Views)'.'All Absence Approvals', Absence.Name = row_absencename.Text)

    And row_absencename is a Label I put in the Master gallery and is simply bound to the absence name.

    Funny enough this works and has a good performance,

    Cause I noticed using a seperate variable for keeping SelectedItem had a hard performance impact cause all Detail grids were getting updated, but this way affects only the current record.

     

    Thank you @v-jefferni , for your help,

    See if you have something else to add to this and then I will close the topic.

  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @MattFreeman ,

     

    It seems the two columns are not with Text type, that makes sense. 

     

    Best regards,

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 428

#2
Haque Profile Picture

Haque 338

#3
timl Profile Picture

timl 333 Super User 2026 Season 1

Last 30 days Overall leaderboard