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

Combine two actions - press button and change selection of dropdown

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"))

4 ACCEPTED SOLUTIONS

Accepted Solutions
WarrenBelz
Super User
Super User

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.

View solution in original post

CNT
Super User
Super User

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

View solution in original post

K369
Resolver II
Resolver II

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

View solution in original post

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

View solution in original post

4 REPLIES 4
WarrenBelz
Super User
Super User

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.

View solution in original post

CNT
Super User
Super User

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

View solution in original post

K369
Resolver II
Resolver II

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

View solution in original post

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

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,922)