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
@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-
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?
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.
My Sharepoint wasn't a single line of text, it was a CHOICE option. My form in edit mode:
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.
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.
Learn how to create your own user groups today!
Check out the new Power Platform Community Connections gallery!
Congratulations, the new Super User Season 2 for 2021 has started!
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.