cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
geddb
Helper I
Helper I

Circular reference between dropdown and datacard on Edit form

I'm really struggling with this and feel like I'm in way over my head. What I am trying to do seems so fundamentally simple in theory but I just cannot believe how difficult it has ben and I just can't  get it to work and I have been working on this for days. Any assistance would be immensely appreciated.

I am building an activity tracker that has 7 simple enquiry types and 2 very complex types, therefore I have included 2 forms on my Powerapps 'NEW SCREEN'. The first handles all the simple enquiry types and one of the complex enquiry types and the second form is for second complex ENQUIRY TYPE. I set it up this way because there are more than 120 different fields connecting in and the complexity behind showing and hiding so many elements based on the ENQUIRY TYPE was getting out of control. So the theory was, instead of turning on and off x number of controls, I would just turn on and off the different forms - simple right?.

In order to achieve this, I had to create a dropdown outside both forms so the visible properties of each form could be altered based on the ENQUIRY TYPE populated into that new dropdown (called ddEnquiryType).

This is working well on the NEW FORM and although it hasn't been completely tested, it seems like all is working fine, but on the EDIT screen, I just cannot get the ddEnquiryTypeEdit dropdown to display the selected SharePoint List Items Enquiry Type and now every time the users call on the edit screen in the SharePoint List, the first entry in the dropdown displays in the form regardless of what the List Item's Enquiry Type is.

I've been working on this for days. I've tried passing the values in and out of the form via text labels and altering the UPDATE control on the DataCard in the form to UPDATE ddEnquiriyTypeEdit instead of the DataCard dropdown and I just can't get it to work. I've tried lookups and filters and now I'm getting circular references and I am absolutely at a loss.

I'm not sure what information to provide (code from which elements, screenshots of what etc.) so if someone could please respond and ask what you need to see, I will gladly post.

My sincere thanks in advance for any assistance you can provide.

 

@WarrenBelz @RandyHayes @Drrickryp @phipps0218 @BCBuizer 

2 ACCEPTED SOLUTIONS

Accepted Solutions
NandiniBhagya20
Solution Sage
Solution Sage

I can see that there are 2 solutions to this - 

1. Remove formula from Update property (the one which is causing circular reference error). On select property of submit button add a Patch function that will save the data of dropdown which is outside the form to your column - Enquiry Type of SharePoint list : Patch('OVG WIP Tracker', LookUp('OVG WIP Tracker', 'Enq ID' = DataCardValue1_4.Text), {'Enquiry Type': {Value:ddEnquiryTypeEdit.Selected.Value}})

2. Use the dropdown that is there in the form for capturing Enquiry Type data


Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

View solution in original post

Hi again @NandiniBhagya20 . I got the dropdown to populate with the SharePoint list item entry. I used this code:

 

SharePointIntegration.Selected.'Enquiry Type'.Value

 

Many many thanks for your help :o).

View solution in original post

15 REPLIES 15
NandiniBhagya20
Solution Sage
Solution Sage

Hi,
Could you please share the formula where you are getting the circular reference error.


Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

geddb
Helper I
Helper I

Thank you so much @NandiniBhagya20 :

geddb_0-1660038277794.png

 

I have some queries regarding the issue (i am trying to reproduce the same error at my end) - 

1. On which property and for which field you have added this formula
2. Is there any dropdown cascading functionality added

3. DaraCardValue1_4 has which information in it


Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

1. On which property and for which field you have added this formula:
The DEFAULT property of the ddEnquiryTypeEdit dropdown outside of the forms

 

image.png
2. Is there any dropdown cascading functionality added

I'm sorry @NandiniBhagya20 , I'm not sure what that is - I'm relatively new to PowerApps.

3. DataCardValue1_4 has which information in it
DataCardValue1_4 has the List Item ID:

geddb_0-1660039809502.png

 

Thank you very much 🐵




Are you using value of ddEnquiryTypeEdit field in the form?


Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

Yes. I need to UPDATE the value of ddEnquiryTypeEdit into the 'Enquiry Type' column of the SharePoint List Item if it changes.

NandiniBhagya20
Solution Sage
Solution Sage

You can use Parent.Default in the Update property as you are fetching the same value of Enquiry Type field from your SP List


Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

Will that work even though ddEnquiryTypeEdit dropdown (which has no UPDATE property because it is not part of the form) is not connected to the SPL? In other words, the UPDATE property of the DataCard that connects to the SPL also contains the drop down that the user is not changing. They are changing ddEnquirtyTypeEdit instead which is outside both forms on the edit screen. I really appreciate your help @NandiniBhagya20 🐵

NandiniBhagya20
Solution Sage
Solution Sage

I can see that there are 2 solutions to this - 

1. Remove formula from Update property (the one which is causing circular reference error). On select property of submit button add a Patch function that will save the data of dropdown which is outside the form to your column - Enquiry Type of SharePoint list : Patch('OVG WIP Tracker', LookUp('OVG WIP Tracker', 'Enq ID' = DataCardValue1_4.Text), {'Enquiry Type': {Value:ddEnquiryTypeEdit.Selected.Value}})

2. Use the dropdown that is there in the form for capturing Enquiry Type data


Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,964)