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 Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,410)