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

Announcements

News and Announcements icon
Community site session details

Community site session details

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

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?
  • Verified answer
    Mark Nanneman Profile Picture
    993 Moderator on at
    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
    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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 225

#3
M Bilal Khan Profile Picture

M Bilal Khan 192

Last 30 days Overall leaderboard