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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Get a User Email based...
Power Apps
Unanswered

Get a User Email based on a Combo Box / Person Group Field

(0) ShareShare
ReportReport
Posted on by

Hello,
I have two fields:
1. data type is a person group field and its name is cboColleague and my connector is Office365Users

2. my items property looks as follows: 

Office365Users.SearchUser({searchTerm:txtSearchColleague.Text}).DisplayName and as you can see from the image it is working.
3. Colleague Email: I want this field to auto populate the email of whoever is selected from my cboColleague field. Is this possible?

ChrisL58_0-1717172585802.png

 

 

 

Categories:
I have the same question (0)
  • madlad Profile Picture
    2,637 Moderator on at

    Hi!

     

    Just want to confirm, you need to get the email of the colleague selected in your combobox, and use it to fill in the colleague email field?

     

    I believe this can be accomplished by using the following code in the ColleagueEmail's text property:

     

    *cboColleagueCombobox*.Selected.Mail

     

    ^ Just switch *cboColleagueCombobox* with the appropriate control name

     

    Hope this helps!

  • ChrisL58 Profile Picture
    on at

    Hi and thanks for responding.
    I tried that and the only option is DisplayName.

    ChrisL58_0-1717174972379.png

     

    I think its because my combo box is only pulling in the Display Name.Office365Users.SearchUser({searchTerm:txtSearchColleague.Text}).DisplayName

  • madlad Profile Picture
    2,637 Moderator on at

    @ChrisL58 

    Are you able to remove the .DisplayName? This would be the easiest way to get the email

    You can keep it so it only shows the user the display names by modifying the combobox's display fields:

    madlad_0-1717175700364.png

     

    Let me know!

  • Verified answer
    ChrisL58 Profile Picture
    on at

    Ok, back to basics here.

    ChrisL58_0-1717177035539.png

    Here is what I have and the cboColleague field now shows the people and when I made a choice using cboColleague_1.Selected.Mail the field shows the email. Great but I need to filter the cboColleague_1 field using the txtSearchColleague text box at the top left. 
    The items property now shows 

    Choices([@'BLC Goal Tracking'].Colleague) - Can I filter this?

    And I need to use the below function.
    Name.Office365Users.SearchUser({searchTerm:txtSearchColleague.Text}).DisplayName
    Am I going about this wrong? Can I filter the current combo box by the txtSearchBox?

  • Verified answer
    madlad Profile Picture
    2,637 Moderator on at

    @ChrisL58 

    In the items property of cboColleague_1, can you use:

     

    Office365Users.SearchUser({searchTerm:txtSearchColleague.Text})

     

     

    This will use your office365users search but returns the whole profile instead of just the display name, so you can reference the mail in the colleague email text with "cboColleague_1.Selected.Mail".

     

    Let me know how it goes!

  • ChrisL58 Profile Picture
    on at

    Thats it, Thank you! 
    Something this simple and I was hitting all around it.
    After using your formula I was able to get it working.
    Just needed to change the Primary Text and SearchField to "Display Name"

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard