cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
greenkg24
Regular Visitor

Combine mutli select person/group column and their respective emails into "TO:" line to send one email to many

I have an app that shows a gallery of records, I also have a form viewer that shows information related to the currently selected item in the gallery. Each record contains a person/group field that allows users to add one or more people to the field. 

 

I have added another screen that takes the currently selected item and attempts to copy and paste a few fields, one being the person/group field, into an email message that would allow the user to send an email to the people designated for the selected record. 

 

The trouble I'm running into is I cannot for the life of me get the email to send to all people listed. I can get it to work when only one person is selected, but not when there are multiple. 

 

The items attribute for the field containing the person/group data is:

 

 

Choices([@'list name'].columnname)

 

 

Which works fine as it is in the form viewer, DisplayMode.View. This is the field that I'm trying to copy and paste the emails of the people listed into the "TO" line of the email screen. 

 

Here is what I have so far in the OnSelect attribute of the "Send" button for the email screen:

 

 

Office365Outlook.SendEmailV2(DataCardValue19_6.Selected.Email, TextInput1_1, TextInput1_2);Navigate(Confirmation, Fade);

 

 

 

This works everytime, but only sends the email for the last person select. I've tried concat and concatenate but I've only got it to copy and concatenate on the last person. 

 

The "DataCardValue19_6" in the formula above is referencing a form viewer in edit mode. The items attribute of the combo box I'm using as the "TO" line is:

 

 

Choices([@'list name'].columnname).Email

 

 

which populates the combo box as seen below in the screen shot. 

greenkg24_0-1634497756777.png

 

Any help is much appreciated!!

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @greenkg24 ,

Try this

Office365Outlook.SendEmailV2(
   Concat(
      DataCardValue19_6.SelectedItems,
      Email & ";"
   ),
   TextInput1_1, 
   TextInput1_2
);
Navigate(Confirmation, Fade);

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

2 REPLIES 2
WarrenBelz
Super User
Super User

Hi @greenkg24 ,

Try this

Office365Outlook.SendEmailV2(
   Concat(
      DataCardValue19_6.SelectedItems,
      Email & ";"
   ),
   TextInput1_1, 
   TextInput1_2
);
Navigate(Confirmation, Fade);

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

greenkg24
Regular Visitor

That worked, thank you so much!! 

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (4,168)