cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
MonoM
Level: Powered On

Two separate emails within one button

Hello All,

I have created 2 separate apps that connect to each other.  A Training Request Portal (for training leads to request training's) and an Admin Page (for Management to update "status", view all information provided, and input data on the training's. All information coming from the Training Request Portal).

 

Within the Admin App one is able to edit and save information and or Update "Status"/ content. 

 

Completion Email.PNG

 

Upon clicking "Save Edit" I have an email that gets sent to the Training Requester telling them that an update has been made. Although I have that email for any changes within this tab, I would like a different email sent if "Status" is changed to "Facilitation Complete". I already have two separate emails for each, but I don't know how to NOT send the "Update has been made" email and only the "Your Training is Complete" email. Right now Both emails get sent when someone selects "Facilitation Complete" and then clicks "Save Edit". In that case I only want the Training Completion email sent.

 

Any help would be appreciated,

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
EricLott
Level 10

Re: Two separate emails within one button

Try this

SubmitForm(AssignmentForm_1) &&
If(StatusUpdate.Selected.Value = "Facilitation Completed",
Office365Outlook.SendEmailV2(MicrosoftEmail_Detail_1.Text, "Update Notice", "Hello " & TrainingPOC_Assignment_1.Text & "," & "<font color=black><br><br>This is an automatic email informing that your request has been completed.<br><br>" & "<br>You may check the update of your request by logging into the request portal." & "</b><br><br>Trainig Report:</font>" &
"<br><br>Kind regards,<br>Training Team"),
Office365Outlook.SendEmailV2(MicrosoftEmail_Detail_1.Text, "Update Notice", "Hello " & TrainingPOC_Assignment_1.Text & "," & "<font color=black><br><br>This is an automatic email informing that your request has been updated.<br><br>" & "<br>You may check the update of your request by logging into the request portal (Portal link is located at the bottom)." & "</b><br><br>If additional information is required, you will receive an email requesting you to provide additional information by a specified due date.</font>" & "<br><br>Kind regards,<br>Training Team"))

View solution in original post

4 REPLIES 4
EricLott
Level 10

Re: Two separate emails within one button

You can use a If() for this like so

If(Status = "Facilitation Complete",
//Send Email 1,
//Send Email 2
)

 ---
If this answered your question, please click "Accept Solution". If this helped, please Thumbs Up.

MonoM
Level: Powered On

Re: Two separate emails within one button

This is my code for OnSelect "Save Edit" right now. In which I am receiving both emails still.

 

SubmitForm(AssignmentForm_1) &&
Office365Outlook.SendEmailV2(MicrosoftEmail_Detail_1.Text, "Update Notice", "Hello " & TrainingPOC_Assignment_1.Text & "," & "<font color=black><br><br>This is an automatic email informing that your request has been updated.<br><br>" & "<br>You may check the update of your request by logging into the request portal (Portal link is located at the bottom)." & "</b><br><br>If additional information is required, you will receive an email requesting you to provide additional information by a specified due date.</font>" & "<br><br>Kind regards,
<br>Training Team");

If(StatusUpdate.Selected.Value = "Facilitation Completed", Office365Outlook.SendEmailV2(MicrosoftEmail_Detail_1.Text, "Update Notice", "Hello " & TrainingPOC_Assignment_1.Text & "," & "<font color=black><br><br>This is an automatic email informing that your request has been completed.<br><br>" & "<br>You may check the update of your request by logging into the request portal." & "</b><br><br>Trainig Report:</font>" &
"<br><br>Kind regards,
<br>Training Team"))

EricLott
Level 10

Re: Two separate emails within one button

Try this

SubmitForm(AssignmentForm_1) &&
If(StatusUpdate.Selected.Value = "Facilitation Completed",
Office365Outlook.SendEmailV2(MicrosoftEmail_Detail_1.Text, "Update Notice", "Hello " & TrainingPOC_Assignment_1.Text & "," & "<font color=black><br><br>This is an automatic email informing that your request has been completed.<br><br>" & "<br>You may check the update of your request by logging into the request portal." & "</b><br><br>Trainig Report:</font>" &
"<br><br>Kind regards,<br>Training Team"),
Office365Outlook.SendEmailV2(MicrosoftEmail_Detail_1.Text, "Update Notice", "Hello " & TrainingPOC_Assignment_1.Text & "," & "<font color=black><br><br>This is an automatic email informing that your request has been updated.<br><br>" & "<br>You may check the update of your request by logging into the request portal (Portal link is located at the bottom)." & "</b><br><br>If additional information is required, you will receive an email requesting you to provide additional information by a specified due date.</font>" & "<br><br>Kind regards,<br>Training Team"))

View solution in original post

MonoM
Level: Powered On

Re: Two separate emails within one button

Thank you so much @EricLott !

 

It worked like a charm!

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (4,931)