Notifications
Announcements
I would like to have a button that when selected would send a value to a combo box in my form that already has values in it. When I attempt this it simply removes the values and replaces it.
Set the Items property of the combo box to a collection. Then, add the new item to the collection.
Will this retain the items currently selected in the combo box?
Hi @FernandB1 ,
Please supply (in Text) the Items and DefaultSelectedItems of the Combo Box, the Update of the Data Card it is in and the Names of the List and Field you are writing to.
Hi Warren,Items: Choices([@'STARS Screening Form'].Today_x002c_Iamreportingon_x0028)DefaultSelectedItems:Parent.DefaultUpdate:Reporting.SelectedItemsList Name:STARS Screening FormForm name:Form2Thank you!
Using your Values
Items - OK if this is a Choice column
Choices([@'STARS Screening Form'].Today_x002c_Iamreportingon_x0028)
DefaultSelectedItems:
ThisItem.Today_x002c_Iamreportingon_x0028
Update - should be OK
Reporting.SelectedItems
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.
Visit my blog Practical Power Apps
What would the OnSelect property of the button be in order for me to pass the value to the combo box?
@FernandB1 ,
Sorry - missed that part on the button - go back to @sopatte 's response - you need to collection.
OnVisible of your screen (or wherever it's convenient to initialize this collection):
Collect(ComboItems,Choices([@'STARS Screening Form'].Today_x002c_Iamreportingon_x0028))
Items
ComboItems
Button's OnSelect
Patch(ComboItems, Defaults(ComboItems), {YourComboDisplayField: TheValueYouWantToAdd} )
I think something like that will work. I haven't tried it.
Thank you sopatte,The patch does not seem to be working. The value does not appear in the combobox.
What's your ComboBox's Items property set to?
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 796 Most Valuable Professional
Michael E. Gernaey 327 Super User 2025 Season 2
Power Platform 1919 268