web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Update Dataverse Table...
Power Apps
Unanswered

Update Dataverse Table from combo box in gallery

(0) ShareShare
ReportReport
Posted on by 12
I have the following elements in a Power Apps canvas:
  1. A collection called colUsersList that contains one column (Value) with the following items: {"","Peter Smith", "Joe Perez"}
  2. A gallery connected to a Dataverse Table called 'Dataverse-ActiveTable' with two columns: "Table-comment" and "Table-User"
  3. Inside the gallery I have a text box (txt_comment) and a combo box(combo_user)--only one item can be selected.
  4. The combo box is populated from the colUsersList.
  5.  To patch the value on the text box I use the following in the OnChange property: 
    Patch('Dataverse-ActiveTable',ThisItem,{'Table-comment':txt_comment.Text})
    6. To patch the value from the combo box, I use the following in the OnChange property:
    Patch('Dataverse-ActiveTable',ThisItem,{'Table-comment':Concat(ComboBox1.SelectedItems,"")})
     
    My questions are:
    1. When I change the value in the text box, the table is updated correctly and the comment displayed on the text box. But when the value changes in the combo box, the user name flashes for a second and then disappears. The value on the table is not updated. What am I doing wrong?
    2. How do I update the DefaultSelectedItems in this case?
I have the same question (0)
  • Verified answer
    Mark Nanneman Profile Picture
    991 Super User 2025 Season 2 on at
    Update Dataverse Table from combo box in gallery
    The problem is that you aren't selecting the .Value property of your combobox's selected item or items.

    Assuming your "Table-Comment" column is a text field or a single choice field, try writing your patch like this:
     
    (I'm using Self.Selected.Value assuming this is on the "on change" property of your combo, if it's on another control like a save button, then you'd replace "Self." with "ComboBox1.")
     
    Patch('Dataverse-ActiveTable',ThisItem,{'Table-comment':Self.Selected.Value})
     
    If you have multi-select enabled or just want to use the "SelectedItems" output for some reason then write it like this:
     
    Patch('Dataverse-ActiveTable',ThisItem,{'Table-comment':Concat(ComboBox1.SelectedItems.Value,", ")})
  • fero Profile Picture
    12 on at
    Update Dataverse Table from combo box in gallery
    Thanks for the answer. That solved my first question. I'm still unable to manage the DefaultSelectedItems. Using 
    ThisItem.'Table-User'. And in this context, I cannot use the concat as in the combo box...

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.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 757 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 322 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 209 Super User 2025 Season 2

Last 30 days Overall leaderboard