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 / Get value from SP list...
Power Apps
Answered

Get value from SP list that we just Inserted

(0) ShareShare
ReportReport
Posted on by 40

Hello Community,

 

How do we get the value from SP list that we just inserted by Patch and get it for send email?

 

I have button Reject OnSelect

Am4ree_0-1659582572155.png

Am4ree_1-1659582679653.png

Results

Am4ree_3-1659582856866.png

Currently I'm missing Manager Rejected Date that I just inserted. in SP List, the value of Rejected date has created but I can't get it to send email.

 

anyone able to help?

 

appreciated.

 

Categories:
  • rb Profile Picture
    835 Super User 2024 Season 1 on at

    Good news!! Patch actually returns exactly what you are looking for, you just need to capture it in a variable using Set() or UpdateContext(). Eg:

    UpdateContext({SubmittedRecord: Patch('ASCIS PR Tracking', {ID: 1}, {Comments: "Updated record!!"})})

    Then you can reference SubmittedRecord like any other.

     

    https://docs.microsoft.com/en-us/power-platform/power-fx/reference/function-patch 

    metsshan_0-1659590742534.png

     

  • CU22070439-0 Profile Picture
    40 on at

    Hi @metsshan 

     

    Great, Let me try it. Once there is issue I'll post update in here.

     

    Thanks

  • CU22070439-0 Profile Picture
    40 on at

    Hi @metsshan 

     

    Unfortunately I still can't get the return value when received email. here look like after implement update context().

    I still missing 'Manager Approved Date' and Comments value but Patch has successfully updated in SP.

    Am4ree_0-1659608466505.png

    Rejected Date - Comments Value in SP

    Am4ree_1-1659608640133.png

     

     

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @Am4ree,

    Have you solved your problem?

    Do you want to get the last updated record after you save it?

     

    Actually, I think you could reference to the Modified column in your List to capture the latest record.

    Office365Outlook.SendEmailV2(
     "QiQiao@xxxx.onmicrosoft.com",
     "HolaWorld",
     "Date" & First(
     Sort(
     BU,//This is my data source
     Modified,
     Descending
     )
     ).Modified
    )

    vqiaqimsft_0-1660032806495.png

     

  • CU22070439-0 Profile Picture
    40 on at

    Hi @v-qiaqi-msft ,

     

    Theoretically Yes, I just want to get return value that I have patch function on Rejected Button.

    When Rejected Button Pressed - it will patch state from submitted to Rejected and insert new value on 'Manager Rejected Date'  (Date) and 'Comments' (Text Input) Column in SP.   and Send email to recipient to including new value that I had inserted before.

    Am4ree_0-1660115464954.png

    Am4ree_2-1660117168276.png

     

    but I still can't get new value when received email

    Am4ree_3-1660117272846.png

     

     

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

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 312

#3
Mohsin Ali Profile Picture

Mohsin Ali 252

Last 30 days Overall leaderboard