cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper II
Helper II

Submit button question

Good morning,

I have a Powerapp built to fill in items from a Sharepoint list. I've successfully set up the submit button to notify if errors, and submit via Patch to my SP list. 

 

I want to add a 3rd layer and have an email kicked off to the submitter of the form to let them know if the submission went through successfully. I understand the Mailto functionality somewhat, but i'm not sure how to integrate that into my existing formula. Also i'm not sure where to get the submitter info from since it's not a question in my app (but it does show up on my Sharepoint notifications).  Any thoughts?

 

If(
IsEmpty(
Errors(
'SEBS Proposals',Patch('SEBS Proposals',Defaults('SEBS Proposals'),Form1.Updates,Form2.Updates,Form3.Updates,'Form3.1'.Updates,Form4.Updates,Form5.Updates,Form6.Updates);)
),
Notify("Submitted Successfully",NotificationType.Success);Navigate(Screen7),
Notify("There is an error with your Submission- please contact sebsnewbusiness@paychex.com",NotificationType.Error)
)

 

1 ACCEPTED SOLUTION

Accepted Solutions

Please be aware that Office365Outlook.SendEmail() function requires 3 parameters (To, Subject, Body) and other optional parameters.

As I can see you give only 2 parameters in each invocation of the function.

Also please be aware the SendEmail is considered deprecated and it will be replaced by SendEmailV2.

 

 

View solution in original post

4 REPLIES 4
Community Support
Community Support

Hi @slan2018 ,

Do you want to 

1)when the form is submitted successfully, Notify"Submitted Successfully",Navigate to screen7 and send en email about result

2)when the form is not submitted successfully,Notify"There is an error with your Submission and send en email about result?

If so, firstly, you need to connect with office365 outlook connector.

12175.PNG

 2)Try this formula:

If(
IsEmpty(
Errors(
'SEBS Proposals',Patch('SEBS Proposals',Defaults('SEBS Proposals'),Form1.Updates,Form2.Updates,Form3.Updates,'Form3.1'.Updates,Form4.Updates,Form5.Updates,Form6.Updates);)
),
Notify("Submitted Successfully",NotificationType.Success);Navigate(Screen7);Office365.SendEmail(To email address,"form result","your form has been submitted successfullly!"),
Notify("There is an error with your Submission- please contact sebsnewbusiness@paychex.com",NotificationType.Error);Office365.SendEmail(To email address,"form result","your form hasn't been submitted successfullly!")
)

Please fill in the toemailaddress with the emailaddress that you want to send to.

If you want to send this to current user, you could use: User().Email.

Here's a doc about how to use this connector for your reference:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/connections/connection-office365-outloo...

 

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-yutliu-msft - thanks for the help! I am trying the formula but getting some errors. Any thoughts?

image.png

bump

Please be aware that Office365Outlook.SendEmail() function requires 3 parameters (To, Subject, Body) and other optional parameters.

As I can see you give only 2 parameters in each invocation of the function.

Also please be aware the SendEmail is considered deprecated and it will be replaced by SendEmailV2.

 

 

View solution in original post

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (11,477)