cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Responsive Resident
Responsive Resident

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
Responsive Resident
Responsive Resident

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (8,566)