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

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (61,787)