cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ShanP
Advocate II
Advocate II

Selected dropdown option not displayed on edit form

I have a form application app, the user creates a form and can then view it and edit it after. The form has a few dropdown options. The selected option shows up when on the view screen of the form, but when the user wants to edit the form, the dropdown displays blank. How can I make it so the dropdown displays the option that the user selected during the edit screen?

4 REPLIES 4
Anonymous
Not applicable

Can you show us your setup? 

 

What data source you are using? Are the unique values enforced in the datasource or in app?

 

I have an app where I have a string type in SQL Server but I enforce only several option in PowerApps.

In order to show the selected item in ViewForm and EditForm I do the following.

 

  1. In EditForm, connect it with your datasoure
  2. Item, select it which item to display (usually it’s something like Gallery1.Selected)
  3. Add the card for the dropdown, it will be added as text input, while the card is still locked select for it to be allowed values.
  4. Unlock the card, under AllowedValues property put in hard coded values or link to database table which has all allowed values.
  5. Under Default property put the field name (if Item is connected to gallery it’s going to be something like Gallery1.Selected.MyField)
  6. This way the EditForm dropdown will always have selected the option which already is selected in a database for this record

 

Data source is excel file on onedrive. The values are from the excel file.

datasource.png

 

Anonymous
Not applicable

The default value of the Card which holds the dropdown, or the default property of the dropdown should be changed to whatever you want to show. 

 

The form you are showing appears to be NewForm not EditForm (because of lack of entries in other fields)

 

Where does user enter a value, for the dropdown to understand which value to show?

You have to connect user Input field with the DropDown.Default or Card.Default parameter.

 

 

 

Sorry, the list is an editform list, but it is not populated as I just have the problem with the drop down, not any of the other fields.

 

The drop down has 5 options, these options are chosen by me and stored on an excel file. The options are pulled from excel using distinct(Dropdown, Protection). Dropdown is the table name and Protection is the header of the column.

 

So the problem is that when a user wants to edit their form, all the other entries display properly, but the drop downs do not show the selection of the user. They are actually blank, so for the time being I filled it in with default values.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Did you miss the call? Check out the recording here!

Top Solution Authors
Top Kudoed Authors
Users online (27,357)