cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ahhollan
Helper V
Helper V

dropdown in edit mode has no selected value

I have a dropdown on a form that works great in new mode.  However, when I open the edit form for a specific record number, the dropdown is blank.  How do I get the dropdown to show the previously selected value? 

 

Card default property: ThisItem.'SBU/BU'

Card Update property: ComboBox1_1.Selected.Result

 

Field default property: LookUp('Project Initiation'.'SBU/BU'.,currentid=ID,'SBU/BU')

Field items property: Sort(Distinct([@'SBU/BU'],Title), Result

 

7 REPLIES 7
jKell
Advocate III
Advocate III

@ahhollan  I had an app that was trying to read DropDown list from sharepoint List datasource.

 

I don't know if it is the same issue you are facing (as my dropdown was multiple select)

I had to set my items for the dropdown control to: Choices([@DATASOURCE].columnWithChoices).

 

 

Hopefully that helps-

Joel

I'm wondering if it's because the SharePoint column is a single line of text. How would I need to set up the dropdown properties to return the value then?

Hi @jKell 

One reason why a control will work when the form is New and not it Edit is that the Item property of the form can be Gallery1.Selected provided that the datasource is identical between the gallery and the form.  If the datasources are not identical, then the Item property of the form has to use a Lookup() to a unique field in the same datasource as the form's datasource, so Gallery.Selected will not work but Lookup(datasource, ID=Gallery.Selected.ID) will.  Of course, that is a whole different issue than why a particular dropdown or combobox control doesn't work. When there is a mismatch between the Item property and the Datasource property of a form, note of the controls will show data. 

@ahhollan 

My Sharepoint wasn't a single line of text, it was a CHOICE option. My form in edit mode:

  1. Onselect in the Gallery I set a varable Set(_selectedItem, ThisItem)
  2. Datasource for form is same as Gallery.
  3. item for form is set to new variable _selectedItem
  4. With this structure the DefaultSelectedItems is Parent.Default

 

As @Drrickryp is saying the Gallery and Form need to have the same datasource. If that is the case, the DefaultSelectedItems should be: Parent.Default.

I don't have a gallery set up. I have a newScreen for submitting an item and an EditScreen for editing an item. One correction, the control is a combobox instead of a dropdown. Does this make a difference?

@ahhollan How are you selecting the item to populate your edit screen?

 

There is a function NewForm(NAME_OF_YOUR_FORM) that makes a new row in your datasource

 

There is a function EditForm(NAME_OF_YOUR_FORM) will edit a record in your datasource

But Edit has to be populated with a record.  I am curious how you are doing that without a gallery.

Hi @jKell 

You could do it with a Dropdown or Combobox control outside of the edit form.  Use the Combobox if there are more than 500 items or if you want to search.  The Item property of the edit form would be Dropdown1.Selected or Combobox1.Selected.

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,223)