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

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (66,563)