cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BigE
Helper II
Helper II

Send email to collection of names with dynamic display names for each item

I have a gallery where I select multiple names using a check box which in turn will create a collection with "FullName" and "Email". This is working as expected. To break that down further, here are the properties of the checkbox:
On Check: Patch(collectEmailStudent, ThisItem, {IsChosen:true, FullName:ThisItem.FullName, Email:ThisItem.Email})
On Uncheck: Patch(collectEmailStudent, ThisItem, {IsChosen:false, FullName:"", Email:""})

 

I have a button on the screen that I would like to use with the send email function and I have this working, sort of. Here is the formula I have at the moment:
Office365Outlook.SendEmail(Concat(collectEmailStudent, Email & "; "), "Action Needed: Missing Faculty Advisor’s Approval of Internship Proposal", "Dear " & LookUp(collectEmailStudent, IsChosen=true).FullName & ",", {Importance:"High", IsHtml:true});

 

Everyone I select receives the email but what I'm trying to do is personalize each one with their own "FullName". All it is doing now is sending an email to all that are checked but only selecting the "FullName" from the first one in the list. Does anyone have any ideas that be able to point me in the right direction?

 

Thanks,
Eric

1 ACCEPTED SOLUTION

Accepted Solutions
Alex_10
Super User
Super User

What if you try:

ForAll(Filter(collectEmailStudent, IsChosen = true),
Office365Outlook.SendEmail(
Email,
"Action Needed: Missing Faculty Advisor’s Approval of Internship Proposal",
"Dear " & FullName & ",",
{Importance:"High", IsHtml:true}
)
)

View solution in original post

2 REPLIES 2
Alex_10
Super User
Super User

What if you try:

ForAll(Filter(collectEmailStudent, IsChosen = true),
Office365Outlook.SendEmail(
Email,
"Action Needed: Missing Faculty Advisor’s Approval of Internship Proposal",
"Dear " & FullName & ",",
{Importance:"High", IsHtml:true}
)
)

View solution in original post

@BigE ,

I will leave you with @Alex_10 on this - his syntax should do the job, but a couple of points: -

  • If you use Office365Outlook.SendEmailV2, it automatically detects HTML
  • Email is not a good name for a field as it is a Reserved Word in Power Apps
  • If your testing results in two emails to everyone, this is a known bug in Power Apps

 

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (871)