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 Apps - Power Apps Pro Dev & ISV

Send email to different recipients depending on selections made in form

(1) ShareShare
ReportReport
Posted on by 2
I have a Power Apps form that I have created for supervisors to send shift reports. In this I have a multi-select dropdown with the different departments. Right now, I have a button set up with the form to submit and then send an email using outlook to a block of users that is the same for everyone. I have the body of the email dynamically built in where it only includes the fields that are visible in the form. I have a separate Sharepoint List set up that has a Department and Email List column. It it set up something like this:
 
 
The goal is to have the email sent to the specific users for each of the departments chosen in the dropdown. If the select Dept1, the email would go to the users listed in the screenshot above with Dept1. If they choose both departments, the email would be sent to a concatenated version of the lists above. The reason I've put the email list into a sharepoint list is to allow supervisors to go in and edit who they would like to send the email to without having to copy and paste the email list into an email every day. I have tried different ways to code this into the submit button, but with no success as it keeps saying that the To: area of the email cannot be null.
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,433 Super User 2025 Season 2 on at
     
    I answered on your other thread. Please try to avoid postin gin multiple places, especially as this is not the correct one
     
    You want building Power apps
     
     

    Its really important that you share your code and what is not working so we can help, plus in this case there isn't any details so writing this is just a pseudo guess.
     
    You have 2 lists.
     
    let's pretend your Combobox is called Department
     
    And let's pretend the List you want to get the the emails from is List2
    To get the emails
     
    ONE important detail about the below, depending on how you bound your data to the Department combobox, instead of putting Value, you might have to put the proper column name) 
     
    The below will grab all the records from List2, where the Department Value is in and this is important. the concatenated string of all the things selected in the box
     
    Filter(List2, Department in Concat(Department.SelectedItems, Value))
    Now, you could do something like (and bare with me I'm eating and one handed typing lol)
     
    // Now I put  'Email List' because you have it in the header with a space. I dont know what the proper COLUMN name is in sharepoint, so please put that, don't put what I typed.
     
    // again change Value to be whatever matching column you have. If its just a list of Strings in the Items property of the Combobox, then Value is correct.
     
    Distinct(Filter(List2, Department in Concat(Department.SelectedItems, Value)), 'Email List')
    This gives you just a list of the unique values out of email.. and now we want to create the single email string
     
    Concat(Distinct(Filter(List2, Department in Concat(Department.SelectedItems, Value)), 'Email List'), 'Email List' & ";")
     
    Now one last time, you need to make sure that the proper things are put for
     
    Value
    'Email List' #1
    'Email List' #2 (this will either be the column name of Value (again lol)

     

     
  • ronaldwalcott Profile Picture
    3,847 Super User 2025 Season 2 on at
    Are you using the Office365Outlook.SendEmailV2 connector? 

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard

Featured topics