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

Send email once submit button is clicked and item saved to datasource

Hi,

 

I have a powerapps screen which contains newform with SharePoint as datasource. I have a submit button, which on clicked, send an email to the approver.

 

Currently its working fine and email is being sent. However, I notice that its being sending email on every submit button click.

 

How to ensure that once the submit button is clicked and item is saved to sharepoint list, email should be sent. Any inputs would be helpful.

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Send email once submit button is clicked and item saved to datasource

@Kumar9024021 

Did putting the code in OnSuccess solve your problem?

View solution in original post

3 REPLIES 3
Super User
Super User

Re: Send email once submit button is clicked and item saved to datasource

@Kumar9024021 

Put your code to send an email in the OnSuccess property of the form rather than the OnSelect property of the button.  This will ensure the email only sends once the form has been successfully been submitted and its data is saved to SharePoint.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

 

Super User
Super User

Re: Send email once submit button is clicked and item saved to datasource

@Kumar9024021 

Did putting the code in OnSuccess solve your problem?

View solution in original post

Kumar9024021
Level: Powered On

Re: Send email once submit button is clicked and item saved to datasource

Yep @mdevaney . Thanks a lot.

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (8,637)