Hello Team,
As of now, I have created a power apps ticketing system. I have getting notification when a new ticket is created. Please see the code below.
Office365Outlook.SendEmailV2(
FormCreate.LastSubmit.'Assigned To'.Email,
"A new incident ticket has been assigned: " & FormCreate.LastSubmit.Title,
"A new ticket with the Incident No. " & FormCreate.LastSubmit.'Incident No.' & " has been assigned to you with the below description" & "<br>" & "<b>" & FormCreate.LastSubmit.Description & "</b>"
)
Now I need notification for any status change of the ticket, such work in progress, closed or resolved. How do I achieve that? Which data card or data control do I have to make changes? Please let me know.
Regards
Chandan Mishra
Dear Allen !
Perfect ! This issue is now resolved. I can't thank you enough, how effortlessly you have explained to me.
Now the issue which has been resolved (in this post) is for 'Admin soft dev view' screen. I have another screen by the name 'end user view' screen. End user gets redirected to this screen if they are not part of the "software development" team. Just like in the 'admin soft dev view' screen this watchers button works, I will try to replicate the same for watchers button for 'end user view' screen. I have created a separate post for it. Here is the link
I already am getting help from someone if you look at this post, but I feel, you read my mind better. Please help me in that post too. I am tagging you now.
Hi @ChandanMishra ,
Do you want to send emails to the selected people in Watchers people picker?
If yes, seem your people picker column allows multiple selections, so you can use this formula to get the selected users' email:
Concat(DataCardValue12.SelectedItems.Email,Email&";")
So for you, send emails use this:
Office365Outlook.SendEmailV2(Concat(DataCardValue5.SelectedItems.Email,Email&";"),"abc test","test abc")
Best regards,
Allen
Dear Allen, it was amazing the way you have explained to an amateur like, I understand very easily. Thanks a lot. That previous solution worked for me. Now in the same code, I made little changes. Please find a screenshot. In the upper part of the screenshot, I have commented the codes in the red rectangle and added just Submit (FormDetail) at the end, so that it will save other data controls when someone is not making any changes to ticket status. Hope I have done the right thing because I already have a separate screen for creating ticket.
I have one more task related to this. In the same screenshot, there is another red circle at the bottom, named as 'watchers' They are people picker to choose people who would like to be updated whenever there is any change in the ticket detail or ticket status update and I would like to notify any ticket changes only to the people in the watchers, what changes should I make in the code? Watchers data card name is DataCardValue5I would like to notify watchers for any update made to this ticket
Regards
Chandan Mishra
Hi @ChandanMishra ,
Is the "pencil button" you mentioned the button in DetailScreen? Maybe you added one more action--"Navigate(DetailedScreen)" in the submit button? Am I right?
There is a slight problem with the previous formula, it should send a change alert email only when it is not equal, so try this:
If(!IsBlank(DataCardValue_ID.Text)&&
DataCardValue4.Selected.Value<>LookUp('Incident Management View Tickets',ID=DataCardValue_ID.Text).'Incident Status'.Value,
SubmitForm(FormDetail)&&Office365Outlook.SendEmailV2(changed notification email here )&&Navigate(DetailedScreen),
IsBlank(DataCardValue_ID.Text),SubmitForm(FormDetail)&&Office365Outlook.SendEmailV2(notification email for new ticket here)&&Navigate(DetailedScreen)
)
Notes:
1. <> means "not equals to".
2. If "!IsBlank(DataCardValue_ID.Text)", this means you are editing a record(send change alert email), if "IsBlank(DataCardValue_ID.Text)", this means you are creating a new record(send new record alert email).
Best regards,
Allen
Dear Allen,
Thanks again for your swift response. I applied the changed you had asked for. But few things are still missing. Maybe I have not informed you all the details. You guessed it right and gave me the correct assumption. The name of my form is FormDetail. Earlier when I used to click on SubmitForm(FormDetail), the save button would go back to pencil button. But now after I have added the formula mentioned by you, I am getting emails but the save button is not going back to pencil button. Also, the ticket status is not getting changed in the FormDetail. Please let me know what am I missing here.I am getting email but ticket status is not getting changed. Earlier the ticket status was changing but not getting emails
Hi @ChandanMishra,
How do you edit the existing ticket? Through the Edit Form(your FormCreate form)?
Do you send notification email when user click submit button?
If yes, assume that:
1. Your datasource is a SharePoint list and you want to add notification for the “Status” column.
2. Your Status column is a Choice column.
3. In your edit form, display the ID column, so that there will be a ID_DataCard. The name of my ID column inside ID_DataCard is DataCardValue10. Since ID value cannot be changed(generated automatically when you create new SharePoint item). Even you change the Title or other column value of this item, we still can find this record using the ID value. You can also find this record based on other column like Title.
This time, you can add below formula into your submit button(DataCardValue11 is the name of my Status control, DataCardValue10 is the name of my ID control)
If(DataCardValue11.Selected.Value=LookUp(list9,ID=DataCardValue10.Text).Status.Value,
SubmitForm(EditForm1)&&Office365Outlook.SendEmailV2(notification email for ticket status changed here),
SubmitForm(EditForm1)&&Office365Outlook.SendEmailV2(notification email for new ticket here))
Best regards,
Allen
WarrenBelz
69
Most Valuable Professional
mmbr1606
51
Super User 2025 Season 1
MS.Ragavendar
36