0
votes

Hi I have a PowerApp connected to Sharepoint List. The sharepoint list has 2 to columns that are lookup values of peson/group. Please see screenshot of powerapp display screen below.

screenshot of Display Screen

screenshot of email template

As I noted on the screenshot, I want have a button to send email. When the button is clicked, the email-screen template by PowerApps (Link) appears.

How do I autopopulate the Sponsor and BackUp Sponsor fields to the Email-Template, while still allowing the user to add more people if necessary?

I am not sure if this is needed but 

screenshot of fx

2

2 Answers

0
votes

I don't think you will be able to add the people into that control, but you could create a label that shows the people from your form above the "To" field in the email form and let the user enter additional recipients into the To field.

The icon that triggers the sending of the mail has underlying code in the OnSelect property. The first command in there sets the variable _emailRecipientString by concatenating several strings.

Set( _emailRecipientString, Concat(MyPeople, Mail & ";") );

Add your list of people as parameters inside the Concat() function.

0
votes

I also posted the answer here

here is the answer: Add the code to the Notify/Send Email in the Display Screen

ClearCollect(selecteduser,
         ForAll(DataCardValue1.SelectedItems,Office365Users.SearchUser({searchTerm:Email})),
         ForAll(DataCardValue2.SelectedItems,Office365Users.SearchUser({searchTerm:Email}))
        );
Clear(MyPeople); ForAll(selecteduser,Collect(MyPeople,Value))

I hope this helps someone else