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 / HOW TO GET SELECTED DR...
Power Apps
Answered

HOW TO GET SELECTED DROPDOWN LIST EMAIL ADDRESS IN GALLERY , THEN SEND THEM A EMAIL ,

(0) ShareShare
ReportReport
Posted on by 154

i have one gallery for use input something , one column is for select emial address from dropdown list(it contains many email address) , let us for example , user input 10 itmes , and they selected 3 kinds email address in these 10 items as picture marked bule,  then click one button marked yellow,how to get user selected all the email address  , then send email to them in one time ;

please help me to write code

 

 

KevinGuan_0-1709188418489.png

 

Categories:
  • NPPlatform Profile Picture
    606 Moderator on at

    Hi @KevinGuan , this video shows how to send an email from within Power Apps: https://www.youtube.com/watch?v=bF7WkqtxKB0.  You will need the function Mail.SendEmail() to send the email. The first parameter in the function are the recipients. You can insert the emails from your gallery there.

  • KevinGuan Profile Picture
    154 on at

    hello, thanks for suggestion , yes i know how to send one person , but there are several persons selected in droplist in gallery , then how to write code to send email to them ?

  • Rahman1005 Profile Picture
    109 on at

    Hi,

    Could you please refer below article using power automate we can send email to multiple users.

    https://www.enjoysharepoint.com/send-emails-to-multiple-recipients-from-a-sharepoint-list-using-power-automate/

  • KevinGuan Profile Picture
    154 on at

    Hello , yeah ,this is 80% meet my requirements, but i do not need send email again if user selected same person again , for example , user input 10 items in that gallery , and just selected 3 different persons in that column , when user click that button , we just want send one email to infrom 3 different persons , No need send 10 emails , 

  • Verified answer
    RogierE Profile Picture
    879 Moderator on at

    What you could do is create a collection of receivers of the mail and fill that with all selected emails that you have in all rows. Before you add a new mail to the collection, you can check if the email is already in the collection. 

    Of course for that you would need to save the selected emails per row in the temporary collection that you use for saving. (we called it colTemp in the earlier post with question about saving checkmarks). 

     

    So in the OnChange of the ComboBox you might add something like this:

    UpdateIf(colTemp,ID=ThisItem.ID,{Recipients:Self.SelectedItems})
     
    If you have these emails per row saved, you could add something like this in the code of the green Save button: 
    ForAll(colTemp,
        ForAll(Recipients,
            If(Not(Mail in colSendTo),Collect(colSendTo,{Mail:Recipients[@Mail]}))
        )
    );
    Office365Outlook.SendEmailV2(Concat(colSendTo,Mail&";"),"subject","body")
     
    Please like the reply and/or accept it as the solution if the answer is what you were looking for.
    Note: please don't copy paste the code literally, as your variables and components might be named differently than in my dummy app. Better to understand my code and rebuild it. 🙂 
  • KevinGuan Profile Picture
    154 on at

    hello, thanks, one more thing , how to set drop list default email address value , for example , i want always show XXX@YYY.com in that droplist . the source comes from share point list . column A , (column type is user , comes from our company persons email list)

  • RogierE Profile Picture
    879 Moderator on at

    If the column type is Person, you will be able to show the email address with the .Email part of the record stored in your column. 

     

    Please like the reply and/or accept it as the solution if the answer is what you were looking for.

  • KevinGuan Profile Picture
    154 on at

    yes, the column type is person , but default is blank , you have to search by some text , i want set somebody's email as first selected item , how to write code , 

  • RogierE Profile Picture
    879 Moderator on at
    Something like this in the DefaultSelecteditems of the ComboBox? 
    If(IsBlank(ThisItem.Recipients),[{Mail:"someone@somewhere.com"}],ThisItem.Recipients)
     
    Please like the reply and/or accept it as the solution if the answer is what you were looking for.
  • KevinGuan Profile Picture
    154 on at

    hello gentleman, thanks for your great help again,Firstly , Your code can defaultly show somebody's email in the search field of combobox, it is very OK , thanks , but it just show text "somebody's email" in that fied , i guess system does not search by that text and selected related person . because i tried test saved and upload to sharepoint list ,  checked nothing saved in that column in  list A . 

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 432 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 347

#3
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

Last 30 days Overall leaderboard