cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kriggo15
Responsive Resident
Responsive Resident

ComboBox Issues

Issue:
I use a combobox as a person picker in a form and write the name and email to separate fields in my Azure SQL DB. This works perfectly.
I have another form that allows the editing of records based on a gallery selection. In that form, it populates the owner name but not the email field. It is as if the owner name isn't really selected in the combobox. So when I submit the form, it writes blanks back to the table for OwnerEmail.
OwnerSS.png

OwnerName ComboBox properties:

 

Searching enabled, multiple selections off
Items: Office365Users.SearchUser({searchTerm:ComboBox2_13.SearchText})
DefaultSelectedItems: Filter(Office365Users.SearchUser({searchTerm:ThisItem.OwnerEmail}), Mail = ThisItem.OwnerEmail).DisplayName

 

 

OwnerName ComboBox properties:

 

Default: ComboBox2_13.Selected.Mail

 

 
Form Properties:

FormSS.png

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@kriggo15 

This is because you are trying to match a DisplayName (text) to a record (SearchUser).  This will not actually match and give you a selected item.

 

Please consider changing your Formula to the following for DefaultSelectedItems:

Office365Users.UserProfile(ThisItem.OwnerEmail)

This will return a record that will correspond to a record from the items.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

1 REPLY 1
RandyHayes
Super User
Super User

@kriggo15 

This is because you are trying to match a DisplayName (text) to a record (SearchUser).  This will not actually match and give you a selected item.

 

Please consider changing your Formula to the following for DefaultSelectedItems:

Office365Users.UserProfile(ThisItem.OwnerEmail)

This will return a record that will correspond to a record from the items.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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