Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
Answered

How to get notifications for ticket status change

(0) ShareShare
ReportReport
Posted on by 83

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

  • Chandan Mishra Profile Picture
    83 on at
    Re: How to get notifications for ticket status change

    @v-albai-msft 

    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

    https://powerusers.microsoft.com/t5/Building-Power-Apps/How-do-I-update-watcher-s-list-for-an-end-user-view-who-does-not/m-p/890353#M282665 

    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.

  • Verified answer
    v-albai-msft Profile Picture
    on at
    Re: How to get notifications for ticket status change

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

    v-albai-msft_0-1618556758976.png

    So for you, send emails use this:

    Office365Outlook.SendEmailV2(Concat(DataCardValue5.SelectedItems.Email,Email&";"),"abc test","test abc")

    v-albai-msft_1-1618556846333.png

     

    Best regards,

    Allen

  • Chandan Mishra Profile Picture
    83 on at
    Re: How to get notifications for ticket status change

    @v-albai-msft 

    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 ticketI would like to notify watchers for any update made to this ticket

    Regards

    Chandan Mishra

  • Verified answer
    v-albai-msft Profile Picture
    on at
    Re: How to get notifications for ticket status change

    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

  • Chandan Mishra Profile Picture
    83 on at
    Re: How to get notifications for ticket status change

    @v-albai-msft 

     

    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 emailsI am getting email but ticket status is not getting changed. Earlier the ticket status was changing but not getting emails

  • v-albai-msft Profile Picture
    on at
    Re: How to get notifications for ticket status change

    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.

    v-albai-msft_0-1618294591144.png

     

    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

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Power Apps Pro Dev & ISV

#1
WarrenBelz Profile Picture

WarrenBelz 69 Most Valuable Professional

#2
mmbr1606 Profile Picture

mmbr1606 51 Super User 2025 Season 1

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 36

Overall leaderboard