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 / Combine two actions - ...
Power Apps
Answered

Combine two actions - press button and change selection of dropdown

(0) ShareShare
ReportReport
Posted on by 216

Hello all,

If you see my previous posts I was helped by a kind member to trigger email if dropdown value is changed to specific selection. Its all good.

I am now combining two actions i.e. Change selection of dropdown & then press button to trigger sending email. With following formula, I do not get any errors but its not working.. Any help please. Thanks

 

If(DataCardValue28.Selected.Value = "Closed" && Button3.Pressed, Office365Outlook.SendEmailV2("myname@mystuff.com", "Subject line", "This is a message body"))

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    155,752 Most Valuable Professional on at

    Hi @K369 ,

    Set a Variable on the Button OnSelect

    UpdateContext({varSend:true})

    then your code<

    If(
     DataCardValue28.Selected.Value = "Closed" && varSend, 
     Office365Outlook.SendEmailV2(
     "myname@mystuff.com", 
     "Subject line", 
     "This is a message body"
     )
    )

    and at screen OnVisible

    UpdateContext({varSend:false})

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Verified answer
    CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @K369 In the OnSelect of the Button place this code,

    If(
     DataCardValue28.Selected.Value = "Closed", 
     Office365Outlook.SendEmailV2(
     "myname@mystuff.com", 
     "Subject line", 
     "This is a message body"
     )
    )
  • Verified answer
    K369 Profile Picture
    216 on at

    Hi CNT,

    Thanks for the solution. It works well, however I have noticed strange behaviour of combobox control . With this code, as soon as I even touch it, this triggers email even if I have not changed selection to CLOSED. I then viewed other comments on this subject and it seems there is an issue with OnChange for combobox. 

    I am not sure if anyone has got solution, but will be thankful if you can point me towards right direction please.

    Thanks again

  • Verified answer
    K369 Profile Picture
    216 on at

    Ho WarrenBelz,

    Thanks again Sir for helping me.

    Thanks for the solution. It works well, however I have noticed strange behaviour of combobox control . With this code, as soon as I even touch it, this triggers email even if I have not changed selection to CLOSED. I then viewed other comments on this subject and it seems there is an issue with OnChange for combobox. 

    I am not sure if anyone has got solution, but will be thankful if you can point me towards right direction please.

    Thanks again

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 483

#2
WarrenBelz Profile Picture

WarrenBelz 399 Most Valuable Professional

#3
11manish Profile Picture

11manish 327

Last 30 days Overall leaderboard