cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TB05
Resolver I
Resolver I

Edit form to have a comboxbox default value of field in sharepoint list

Good Morning/Afternoon,

I'm hoping someone can help.  I'm editing a record from a gallery and have created a variable for the selected record, called varEmployeeEdit.

In the edit form, I have changed the text box to a combobox that is populated from another list.  So, on the edit form the combobox is populated with the correct list, so user can make their update, but I'm having issues getting the combobox to show the current text value for the selected record.  

 

Thanks 

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @TB05 ,

You need to set the DefaultSelectedItems of the combo box to reflect both the output and the field shown. You have not provided the Items of this, but if for instance the Combo Box output was

ComboBoxName.Selected.Widgets

and the field name it is populating is Gadgets, then the DefaultSelectedItems would be

{Widgets:ThisItem.Gadgets}

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

6 REPLIES 6
WarrenBelz
Super User
Super User

Hi @TB05 ,

You need to set the DefaultSelectedItems of the combo box to reflect both the output and the field shown. You have not provided the Items of this, but if for instance the Combo Box output was

ComboBoxName.Selected.Widgets

and the field name it is populating is Gadgets, then the DefaultSelectedItems would be

{Widgets:ThisItem.Gadgets}

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

TB05
Resolver I
Resolver I

I have another similar issue, where I have a dropdown field in the edit form, the dropdown is populated from another SharePoint list, called bonus.  I have a variable created for the form to pass the record that I'm editing.

Dropdown Items = Bonus.Title, the value of the text that is selected in this dropdown is stored in a Sharepoint list, called employee. I want to be able to update the text field (called bonusvalue) in the list called employee.  I don't want the user to see the value, only the text.  So the dropdown has the list, but want to show the user's default text of the value...so I'm assuming I would need to do a lookup in the bonus table?

 

 

Hi @TB05 ,

Was your initial question answered? If so, please accept as Solution.

Regarding your next question, I have read it a number of times and am still not entirely clear on your structure, but I can make a couple of initial comments

  • For the stored field value to be displayed in a drop-down, it must match the schema of the drop-down (or simply the value must be available to choose from the Items)
  • To update the other list you would need a Patch and if you are retrieving a value other than that selected, yes, you would need a LookUp the other list.

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

TB05
Resolver I
Resolver I

Thank you for your reply, sorry it is difficult to read.  I'm not sure it's doable...  

It's similar to previous issue, same gallery but this time editing a dropdown box.  

I'm editing a record from a gallery and have created a variable for the selected record, called varEmployeeEdit.

In the edit form, I have changed the text box to a dropdownbox that is populated from another list.  So, on the edit form the dropdownbox is populated with the correct list, so user can make their update, but I'm having issues getting the dropdownbox to show the current text value for the selected record.  Issue is the dropdownbox lists text and when the user selects the text, the value is stored (number). I don't want the user to see the number.  And in my code I'm doing some SUM functions before the value is saved, so I doubt I can use it.  

 

Hi @TB05 ,

Please look at the first point I posted last time - the value to be displayed needs to be available in the Items.

Also what is the Default (or DefaultSelectedItems if a Combo Box)?

TB05
Resolver I
Resolver I

I went ahead and added another field to my SharePoint list to capture the title.  Thanks for your help.

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (3,237)