web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Send an email when Yes...
Power Apps
Answered

Send an email when Yes/No field checked

(0) ShareShare
ReportReport
Posted on by 578

I'm building an an app that uses SharePoint data, and I need to send an email when a Yes/No field is checked. I added to onCheck the standard:

 

Office365Outlook.SendEmailV2(
 "billgates@microsoft.com",
 "Email Subject",
 "Email Body",
 {
 Cc:"pepe@microsoft.com"
 }
)

It works, and it sends the email when I toggle it to Yes. The issue that when I submit the form, it sends another email. Is there a way to make this one or the other? I really don't care which one.

 

Thanks.

Categories:
  • Verified answer
    StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @emfuentes27 

     

    The best approach is to send an email after submitting the form successfully. To do that, Remove OnCheck event  code.

    • Submit the form.
    • Set the OnSuccess property of the Form to
    If(EditForm1.LastSubmit.BooleanfieldName,
    Office365Outlook.SendEmailV2(
     "billgates@microsoft.com",
     "Email Subject",
     "Email Body",
     {
     Cc:"pepe@microsoft.com"
     }
    )
    )

     

    If you not storing the boolean field in Sharepoint then send an email when submitting the form

     

    SubmitForm(EditFormName);
    If(Controlname.Value,
    Office365Outlook.SendEmailV2(
     "billgates@microsoft.com",
     "Email Subject",
     "Email Body",
     {
     Cc:"pepe@microsoft.com"
     }
    )
    )

     

     

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 352 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 323

#3
Mohsin Ali Profile Picture

Mohsin Ali 226

Last 30 days Overall leaderboard