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 / Select name of email r...
Power Apps
Answered

Select name of email recepient in the body of the email

(0) ShareShare
ReportReport
Posted on by 36

Hello,

 

I made a simple app to send an email depending on what value the drop down will be.

 

The subject of the email is "Hello you received a package" if you select the drown down package and "Hello you received a envelope" if you select the drop down envelope.

 

The body of the email is also variable and it also depends on what you select from the drop down.

 

My questions is if there is a possibility to select the name of the person to which I'm send the email in the body of the email? 

 

The app looks like this:

 

vsardaru_0-1596961896314.png

 

Its not in English so let me know if you need me to translate something. After the word ""Bună" i need to have the name of the person to which I'm sending the email.

 

Thank you very much,


Vlad

Categories:
I have the same question (0)
  • vsardaru Profile Picture
    36 on at

    Hello,

     

    Can anyone help me with this?

     

    Thank you. 

  • Pstork1 Profile Picture
    69,547 Most Valuable Professional on at

    You could definitely replace the search box you have at the top of the form with a dropdown to select the user's email.  Or just add a dropdown above or below the search box and then use an IF() to get either the entry in the searchbox or the dropdown value.  The one problem I've seen with using a dropdown for this kind of thing is that Dropdowns have a maximum number of entries so a long list of user emails won't work.  That's why search is normally used instead.

  • vsardaru Profile Picture
    36 on at

    @Pstork1 The dropdwon has a condition and depending on what value i select it will populate the Message text box with some text. Isn’t there a way add a condition In the text box or in the dropdown code i already have to select the name of the person i’m sending the email? 
     I can show you the code from the dropdown or anything else if needed. 

  • Pstork1 Profile Picture
    69,547 Most Valuable Professional on at

    That would depend on how the email address of the recipient is being determined.

  • vsardaru Profile Picture
    36 on at

    @Pstork1 The app is made from the email

    screen. I believe you know it and the email

    address of the recipient is determined from the search bar. I type a name, select the name and below the search bar the selected name wil appear. ( not the entire email address only the first and last name). 
     
    Can you help me with this? I am new with powerapps and i would really appreciate your input on this. 

  • Pstork1 Profile Picture
    69,547 Most Valuable Professional on at

    The problem tends to be that the built-in email screen allows adding more than one recipient.  Those recipients are stored in a Gallery called EmailPeopleGallery1 by default.  Since its a collection its hard to get all the names, but you could get the name of the first person in the list using the following expression in the email body.

    First(EmailPeopleGallery1.AllItems).DisplayName

    Add that to the body of the email by putting it in the expression tab of the dynamic content dialog 

  • Verified answer
    v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @vsardaru ,

     

     

    Have your issue been resolved? 

    If so, please mark the solution as answer, if not, I am happy to help further.

    @Pstork1 workaround is great, but It can only return the first username, please try the following code to show all name if you have multiple recipients

    Concat(MyPeople,DisplayName," & ")

    Snipaste_2020-08-11_14-39-44.png

     

    Hope this helps.

    Sik

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 483

#2
WarrenBelz Profile Picture

WarrenBelz 399 Most Valuable Professional

#3
11manish Profile Picture

11manish 327

Last 30 days Overall leaderboard