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}
)
)

@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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (5,127)