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
Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Government Carousel

New forum: GCC, GCCH, DoD - Federal App Makers (FAM)

In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.

Users online (4,540)