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 / CRM lookup Circular re...
Power Apps
Answered

CRM lookup Circular reference between properties problem.

(0) ShareShare
ReportReport
Posted on by

I have the following 2 Lookup fields from CRM in PowerApp:

DataCardValue1, DataCardValue2

 

Now I have a filter on DataCardValue2 by the value in DataCardValue1, and I also have default value on DataCardValue1 when DataCardValue2 is selected.

 

This is how I do it:

  • DataCardValue2-> Items -> Filter(subjects, _pws_casesubsubjectid_value = DataCardValue1.Selected.pws_casesubjectid)
  • DataCardValue1-> DefaultSelectedItems ->First(Filter(subjects, pws_casesubjectid = DataCardValue2.Selected._pws_casesubsubjectid_value))

 

The following create the 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.

If I remove 1 of the above Items or DefaultSelectedItems everything works fine.

 

There is no real collusion between those 2 conditions and I wonder how can I fix this error.

Categories:
  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @CRM-Kfar-Sava,

    Based on the formula that you provided, I think you have faced a circular reference issue within your app.

    Actually, the populated values within your DataCardValue2 is based on the selected value within your DataCardValue1, however, the DefaultSelectedItems value of your DataCardValue1 is also based on the selected value in your DataCardValue2.

    In other words, the DefaultSelectedItems value of your DataCardValue1 is based on the selected value in your DataCardValue1. Currently, within PowerApps, a property could not reference itself or other properties affected by its value.

    As an alternative solution, please take a try with the following workaround:

    Set the Items property of the DataCardValue2 to following:

    Filter(subjects, _pws_casesubsubjectid_value = DataCardValue1.Selected.pws_casesubjectid)

    Set the OnChange property of the DataCardValue2 to following:

    Set(
    SelectedValue,
    First(Filter(subjects, pws_casesubjectid = DataCardValue2.Selected._pws_casesubsubjectid_value))
    )

    Or

    Set(
    SelectedValue,
    LookUp(subjects, pws_casesubjectid = DataCardValue2.Selected._pws_casesubsubjectid_value)
    )

     

    Set the DefaultSelectedItems property of the DataCardValue1 to following:

    SelectedValue

     

    Best regards,

    Kris

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 225

#3
M Bilal Khan Profile Picture

M Bilal Khan 192

Last 30 days Overall leaderboard