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

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

@Kumar9024021 

Did putting the code in OnSuccess solve your problem?

View solution in original post

3 REPLIES 3
mdevaney
Super User III
Super User III

@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."

 

@Kumar9024021 

Did putting the code in OnSuccess solve your problem?

View solution in original post

Yep @mdevaney . Thanks a lot.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

PA Community Call

Power Apps Community Call

Next call is happening on April 21st at 8a PST.

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (95,142)