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 / Circular reference err...
Power Apps
Unanswered

Circular reference error with sorting on a gallery

(0) ShareShare
ReportReport
Posted on by

Hi,

 

My projet is made of a gallery displaying some items stored in an Excel. I want those items to be modified so I added on the side some text entries, dropdowns, etc. Then, when you edit a field, you can push the changes using an icon that run a Patch function to the Excel.
I didn't wanted to use Forms, in order to get more freedom with my fields. Also, all of my fields (text entries, dropdowns, etc.) are components.

 

The dropdown component have the following properties:

  • Input
    • OriginaValue [text] which is then used to set the default value of the combobox (let's name it MyCombobox) inside the component
  • Output
    • CurrentValue [text] which is MyCombobox.Selected.Value ; it is used in the app to retrieve the actual value of the combobox from outside of the component.

Then, on the screen with the gallery, the OriginalValue is set to MyGallery.Selected.NameOfTheColumn. And, in the Patch function, I have something like { NameOfTheColumn: MyComponent.CurrentValue }.

 

Until this point, everything works fine, the Excel is updated when patched, the selection works in the gallery etc.

 

But here is the problem:

I tried to add a sorting tool. It is composed of one of my DropdownComponent (let's name it SortingColumnDropdownCompo). I use it to select the column to be sorted on. And my Gallery Items are : SortByColumns(myExcelTable, SortingColumnDropdownCompo.CurrentValue, Descending).

And the moment I add this line, the sorting seems to be working, but all of my DropdownComponents shows an error message except for the SortingColumnDropdownCompo :

"This rule creates a circular reference between properties, which is not allowed. A property cannot reference itself or other properties affected by its value."

 

But I can't find this circular reference.

I mean, there's obviously one with GalleryItem <- DropdownOriginalValue <- DropdownCurrentValue <- PatchArguments <- Excel <- Gallery. But the patch is only ... a patch, so it's a one-time action.

Moreover this error only appears when I add the sorting formula to the gallery. And the components on the side only mirror what the gallery selected items is.

 

Thanks you for your help,

If you need any precision I will be happy to provide them.

Categories:

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 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard