cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ELindeque
New Member

Drop Down display issue

I have built a Canvas app with large amounts of user input fields. Due to the volume, I'm making use of Sharepoint lists as data sources (each with unique IDs to allow for cross-referencing).

Capture.PNG

The forms themselves are pulled with a Lookup function similar to the below, and is in Edit mode.

  • Lookup(Datasource, Variable = Gallery.Selected.ID)

Among the items on the forms are Drop Down fields with a defined range of items for selection (sourced from a Sharepoint list), some Text Input fields, and some Labels (for displaying statistical calculation results done on the data input).

Capture4.PNG

  

Once the user has selected all the Drop Downs and filled in all the Text Inputs, they click a button to update the Sharepoint lists using a Patch function. 

Capture5.PNG

This part works. All the correct data can be seen in the list afterwards if you open it separately.

The read from Sharepoint also works, as the Labels get updated with the correct values. The Text Inputs also still display the user entered data. All good on those fronts.

The problem is that the Drop Downs revert to the default settings after you update Sharepoint. This does not change the value in the Sharepoint list itself, it just displays incorrectly, which causes confusion for the users.

The Default on all the Drop Downs is Parent.Default

 

Any ideas on where the problem lies?

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@ELindeque 

My first point of confusion on your post is - Why are you using Patch to submit a Form?  You should be using SubmitForm as everything you have spend all that time typing is done automatically for you.

 

When you add a field to an EditForm, you have the option of changing its control type.  For what you are doing, that control type should have been changed to "Allowed Values" .  When you change to that type, you get automatically, a Dropdown control in your field and a property called AllowedValues exposed on the DataCard.  It is in that property that you put your Formula to get the values you want from another place.

 

This will connect the properties from Default to Update through the dropdown control properly.

 

That all said, you will also need to do a ResetForm on your form to get it to reset to the default properties.

 

I hope this is helpful for you.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

3 REPLIES 3
RandyHayes
Super User
Super User

@ELindeque 

My first point of confusion on your post is - Why are you using Patch to submit a Form?  You should be using SubmitForm as everything you have spend all that time typing is done automatically for you.

 

When you add a field to an EditForm, you have the option of changing its control type.  For what you are doing, that control type should have been changed to "Allowed Values" .  When you change to that type, you get automatically, a Dropdown control in your field and a property called AllowedValues exposed on the DataCard.  It is in that property that you put your Formula to get the values you want from another place.

 

This will connect the properties from Default to Update through the dropdown control properly.

 

That all said, you will also need to do a ResetForm on your form to get it to reset to the default properties.

 

I hope this is helpful for you.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
ELindeque
New Member

@RandyHayes , Thank you so much!

 

The reason why I was not using the SubmitForm was that it was not saving the dropdown to the SharePoint List.

 

I have implemented your solution and it solved both issues: dropdowns are working & the SubmitForm Function is working!

RandyHayes
Super User
Super User

@ELindeque 

Excellent!!  Keep in mind, there is nothing that the Form cannot write back in the proper way to a datasource from the SubmitForm.  So don't abandon the features of the Form with a Patch.  Also keep in mind, the Control Type selection is there on fields and is "pretty good" at solving most common types of changes that you want for the form.  There are certainly many that you still have to implement on your own in the data card, but the end result is...you want it to be the basis of your Update property. Once you have all of that...the form is a wonderful control!

 

Glad to help out!

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (1,595)