cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MKMUMU
Helper II
Helper II

Send confirmation mail to form submitter when task status is completed

Hi,

I have a manually created form(not the ready made form of powerapps). When user fill the field and clicks submit button,Task Status is shown as "New" for that user.
I want to send confirmation email to that user if Task Status is changed from "New" to "Completed".

How can i get that user's email when he/she submitted the form and how to send that user an email?
Can anyone give me a detailed solution regarding this?

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @MKMUMU :

Could you tell me what your data source is? Share Point? CDS?

Do you want to know how to get the email address of the creator of a record?

Do you want to know how to send that user an email if the Task Status is changed from "New" to "Completed"?

I assume your data source is Share Point list.( It has a system field "Created by", which records the information of the creator of the record)

I’ve made a test for your reference:

Here is my data source: List B

Column (click to edit)

Type

Title

Single line of text

Field A

Single line of text

Field B

Single line of text

Employee Name

Person or Group

cchoice

Choice

Task Status

Single line of text

1\Add Office 365 Outlook as your data source.

View-Data sources-Connectors-Office 365 Outlook-Add a connection

a.jpg

 

2\ Put this code after your code which is used to change the task status:

 

 

If(
    First(
        Sort(
            'List B',
            Modified,
            Descending
        )
    ).'Task Status' = "Completed",/* Find the most recently modified item */
    Office365Outlook.SendEmailV2(
        First(
            Sort(
                'List B',
                Modified,
                Descending
            )
        ).'Created By'.Email,/*Get the user’s email address*/
        "Subject",/*the email’s subject*/
        "Body"/*the email’s body*/
    )
)

 

 

Best Regards,

Bof

View solution in original post

2 REPLIES 2
v-bofeng-msft
Community Support
Community Support

Hi @MKMUMU :

Could you tell me what your data source is? Share Point? CDS?

Do you want to know how to get the email address of the creator of a record?

Do you want to know how to send that user an email if the Task Status is changed from "New" to "Completed"?

I assume your data source is Share Point list.( It has a system field "Created by", which records the information of the creator of the record)

I’ve made a test for your reference:

Here is my data source: List B

Column (click to edit)

Type

Title

Single line of text

Field A

Single line of text

Field B

Single line of text

Employee Name

Person or Group

cchoice

Choice

Task Status

Single line of text

1\Add Office 365 Outlook as your data source.

View-Data sources-Connectors-Office 365 Outlook-Add a connection

a.jpg

 

2\ Put this code after your code which is used to change the task status:

 

 

If(
    First(
        Sort(
            'List B',
            Modified,
            Descending
        )
    ).'Task Status' = "Completed",/* Find the most recently modified item */
    Office365Outlook.SendEmailV2(
        First(
            Sort(
                'List B',
                Modified,
                Descending
            )
        ).'Created By'.Email,/*Get the user’s email address*/
        "Subject",/*the email’s subject*/
        "Body"/*the email’s body*/
    )
)

 

 

Best Regards,

Bof

View solution in original post

thank You Bof....for your detailed guiding...really appreciate your help..😊

Helpful resources

Announcements
User Groups Public Preview

Join us for our User Group Public Preview!

Power Apps User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (50,470)