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:
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.
Solved! Go to Solution.
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
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
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.
User | Count |
---|---|
206 | |
97 | |
60 | |
51 | |
45 |
User | Count |
---|---|
257 | |
158 | |
85 | |
79 | |
58 |