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 / How to solve - Error: ...
Power Apps
Answered

How to solve - Error: This rule creates a circular reference between properties, which is not allowed. A property cannot reference itself or other properties affected by its value.

(0) ShareShare
ReportReport
Posted on by 174

Hello Experts, 

I have a gallery named Gallery_jobReports, I have placed an Icon beside every name of the column to sort each column. Also I have five checkboxes to filter my data. To filter I have placed five text labels and set its text property to : If(Checkbox4_5.Value = true, Checkbox4_5.Text) this way I get the value of check box into the label which is not visible, so when the user checks any box the data gets filtered. The Items property I have set as below

 

Switch(
 locSortColumn,
 "Title",
 Sort(
 If(
 IsBlank(Label28.Text) && IsBlank(Label29.Text) && IsBlank(Label30.Text) && IsBlank(Label31.Text) && IsBlank(Label32.Text),'SU_Job_List',
 Filter(
 'SU_Job_List',
 StartsWith(
 Brand,
 Label28.Text
 ) || StartsWith(
 Brand,
 Label29.Text
 ) || StartsWith(
 Brand,
 Label30.Text
 ) || StartsWith(
 Brand,
 Label31.Text
 ) || StartsWith(
 Brand,
 Label31.Text
 )
 )
 ),
 Title,
 If(
 locSortAscending,
 SortOrder.Ascending,
 SortOrder.Descending
 )
 ),
 "Project",
 Sort(
 If(
 IsBlank(Label28.Text) && IsBlank(Label29.Text) && IsBlank(Label30.Text) && IsBlank(Label31.Text) && IsBlank(Label32.Text),'SU_Job_List',
 Filter(
 'SU_Job_List',
 StartsWith(
 Brand,
 Label28.Text
 ) || StartsWith(
 Brand,
 Label29.Text
 ) || StartsWith(
 Brand,
 Label30.Text
 ) || StartsWith(
 Brand,
 Label31.Text
 ) || StartsWith(
 Brand,
 Label32.Text
 )
 )
 ),
 Project,
 If(
 locSortAscending,
 SortOrder.Ascending,
 SortOrder.Descending
 )
 ),
 "Episode",
 Sort(
 If(
 IsBlank(Label28.Text) && IsBlank(Label29.Text) && IsBlank(Label30.Text) && IsBlank(Label31.Text) && IsBlank(Label32.Text),'SU_Job_List',
 Filter(
 'SU_Job_List',
 StartsWith(
 Brand,
 Label28.Text
 ) || StartsWith(
 Brand,
 Label29.Text
 ) || StartsWith(
 Brand,
 Label30.Text
 ) || StartsWith(
 Brand,
 Label31.Text
 ) || StartsWith(
 Brand,
 Label32.Text
 )
 )
 ),
 Episode,
 If(
 locSortAscending,
 SortOrder.Ascending,
 SortOrder.Descending
 )
 ),
 "Photographer",
 Sort(
 If(
 IsBlank(Label28.Text) && IsBlank(Label29.Text) && IsBlank(Label30.Text) && IsBlank(Label31.Text) && IsBlank(Label32.Text),'SU_Job_List',
 Filter(
 'SU_Job_List',
 StartsWith(
 Brand,
 Label28.Text
 ) || StartsWith(
 Brand,
 Label29.Text
 ) || StartsWith(
 Brand,
 Label30.Text
 ) || StartsWith(
 Brand,
 Label31.Text
 ) || StartsWith(
 Brand,
 Label32.Text
 )
 )
 ),
 Photographer,
 If(
 locSortAscending,
 SortOrder.Ascending,
 SortOrder.Descending
 )
 ),
 "Shoot Date",
 Sort(
 If(
 IsBlank(Label28.Text) && IsBlank(Label29.Text) && IsBlank(Label30.Text) && IsBlank(Label31.Text) && IsBlank(Label32.Text),'SU_Job_List',
 Filter(
 'SU_Job_List',
 StartsWith(
 Brand,
 Label20.Text
 ) || StartsWith(
 Brand,
 Label21.Text
 ) || StartsWith(
 Brand,
 Label22.Text
 ) || StartsWith(
 Brand,
 Label23.Text
 ) || StartsWith(
 Brand,
 Label24.Text
 )
 )
 ),
 'Shoot Date',
 If(
 locSortAscending,
 SortOrder.Ascending,
 SortOrder.Descending
 )
 ),
 "Brand",
 Sort(
 If(
 IsBlank(Label28.Text) && IsBlank(Label29.Text) && IsBlank(Label30.Text) && IsBlank(Label31.Text) && IsBlank(Label32.Text),'SU_Job_List',
 Filter(
 'SU_Job_List',
 StartsWith(
 Brand,
 Label28.Text
 ) || StartsWith(
 Brand,
 Label29.Text
 ) || StartsWith(
 Brand,
 Label30.Text
 ) || StartsWith(
 Brand,
 Label31.Text
 ) || StartsWith(
 Brand,
 Label32.Text
 )
 )
 ),
 Brand,
 If(
 locSortAscending,
 SortOrder.Ascending,
 SortOrder.Descending
 )
 ),
 'SU_Job_List'
)

 

 The error I am getting is - 

Error: This rule creates a circular reference between properties, which is not allowed. A property cannot reference itself or other properties affected by its value.  However when I use the same formula in my other app it works fine. Please help me in how to deal with this issue.

Thanks.

Below are the screenshots of my screen for your reference.

 

pw5.PNG

Categories:
I have the same question (1)
  • Verified answer
    BCBuizer Profile Picture
    22,505 Super User 2025 Season 2 on at

    Hi @muzamil-baxture ,

     

    After simplifying your formula a bit, there's nothing in there that makes a circular reference stand out:

     

    Sort(
     If(
     IsBlank(Label28.Text) && IsBlank(Label29.Text) && IsBlank(Label30.Text) && IsBlank(Label31.Text) && IsBlank(Label32.Text),'SU_Job_List',
     Filter(
     'SU_Job_List',
     StartsWith(
     Brand,
     Label28.Text
     ) || StartsWith(
     Brand,
     Label29.Text
     ) || StartsWith(
     Brand,
     Label30.Text
     ) || StartsWith(
     Brand,
     Label31.Text
     ) || StartsWith(
     Brand,
     Label31.Text
     )
     )
     ),
     Switch(
    		locSortColumn,
    		"Title", Title,
    		"Project", Project,
    		"Episode", Episode,
    		"Photographer", Photographer
    		"Shoot Date", 'Shoot Date',
    		"Brand", Brand
    	),		
     If(
     locSortAscending,
     SortOrder.Ascending,
     SortOrder.Descending
     )
    )

     

    This makes me think this formula is perhaps not the one causing the circular reference.

     

    Can you check the error details to see what control / property is causing the issue: 

    BCBuizer_0-1679594505688.png

     

    BCBuizer_1-1679594545329.png

     

  • WarrenBelz Profile Picture
    153,051 Most Valuable Professional on at

    HI @muzamil-baxture ,

    As per the PM you sent, I agree with @BCBuizer that there is nothing there that should cause a circular reference unless one of your labels or check boxes, or sort order Variable refers to the gallery or something inside it. I have broken it down bit more and suggest you get rid of those calculated labels as they are prone to calculation order/priority issues, rename your check boxes as below and try this

    SortByColumns(
     Filter(
     'SU_Job_List',
     (
     !ckABC.Value ||
     Brand = "ABC Entertainment"
     ) &&
     (
     !ckHulu.Value ||
     Brand = "Hulu"
     ) &&
     (
     !ckEpisode.Value ||
     Brand = "Episode"
     ) &&
     (
     !ckPhotographer.Value ||
     Brand = "Photographer"
     ) &&
     (
     !ckShootDate.Value ||
     Brand = "Shoot Date"
     )
     ),
     locSortColumn,
     If(
     locSortAscending,
     SortOrder.Ascending,
     SortOrder.Descending
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @muzamil-baxture 

    @RezaDorrani has a very nice video showing how sort and filter columns like you have in your screenshot.  https://www.youtube.com/watch?v=6KlI1iZ_KD0 

  • muzamil-baxture Profile Picture
    174 on at

    @BCBuizer , I tried your given formula and its working perfectly fine. 

    I also tried @WarrenBelz , solution its also working fine but I have delegation issue.

    I really appreciate for your reply's @Drrickryp.

  • walaa96 Profile Picture
    6 on at

    I have the same scenario with the same error, I tried to rename the checkbox or check the formula, it showed like this I didn't get it: 

    walaa96_0-1686725287439.png

     

    Appreciate your support. 

    Many thanks, 

  • walaa96 Profile Picture
    6 on at

    I wrote the formula on the gallery items property:

    Filter(
    Customers_Data_Automate,
    (OU_Name = OU_Login.Selected.Result)
    && (Customer_Name = cbCustomers.Selected.Customer_Name || cbCustomers.Selected.Customer_Name = Blank())
    && If(CheckboxNum.Value, Value(Num_of_Inv.Text)>0, true))

  • WarrenBelz Profile Picture
    153,051 Most Valuable Professional on at

    @walaa96 ,

    The first place to look if the Default of any of these controls refers to the gallery and also confirm that none are in the gallery

    • OU_Login
    • cbCustomers
    • CheckboxNum
    • Num_of_Inv
  • muzamil-baxture Profile Picture
    174 on at

    @WarrenBelz , @walaa96 

    I committed the mistake that I placed one of the controls inside a gallery, that's what gave me this error. Please check all your controls are outside the gallery. That would solve your issue.

     

  • walaa96 Profile Picture
    6 on at

    @WarrenBelz , @muzamil-baxture

    Thanks for your quick support, Num_of_Inv is a label inside the gallery that I want to filter by the checkbox, if the user clicks it the gallery will return only the values that >0, and the CheckboxNum is outside the gallery. I'm a little bit confused. 

  • WarrenBelz Profile Picture
    153,051 Most Valuable Professional on at

    @walaa96 ,

    You need to check all of the things I mentioned

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 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard