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 / Email Not Capturing Pa...
Power Apps
Unanswered

Email Not Capturing Patched Comments

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello everyone.  I have a Power App that captures appended comments along with a myriad of other items, but the appended comments is the one that I am having issues with.  I have the following code in the OnSelect property of a button that patches the updates and then sends an email to the individual identified in the People Picker column.  The email includes all the appended comments data.  The issue I am having is when I submit the update, the most recent comment is not being captured in the email.  It seems as though the email is being sent prior to the patch being fully updated in the SP list.  Is there a way to delay the email until the patch is completed and the SP list is updated to ensure that the email captures the most recent data?  Here is the code I have.  It works great except for that one issue. 

 

Patch('SP List Name',varFormData,'Clarification Email Form'.Updates);(Office365Outlook.SendEmailV2(
'Clarification ComboBox TO'.Selected.Email,
"Re: "& DataCardValue35_1.Text,ClarificationRichTextComments.HtmlText & "<br><br>" & DataCardValue28.Text & "<br><br>" & DataCardValue39.HtmlText&"<br><br>"&'DAS Email Deep Link Html_1'.HtmlText,{Cc:'Clarification ComboBox CC'.Selected.Email}
));
If(
IsEmpty(Errors('SP List Name')),
Notify(
"This task has been updated successfully",
NotificationType.Success
)
);
Navigate('Screen 1');

Any help is appreciated.  Thanks.

Categories:
I have the same question (0)
  • mmollet Profile Picture
    3,187 on at

    If you are pretty sure its a timing issue you could always write a really basic flow and pass it off to flow to handle. This would give you the time delay for SP to update and would also offload the work to MSFT Servers rather than the local device etc. 

     

    Also just to mention if your HTML doesn't work right you may have to add a flag to the email action that lets it know there is HTML code in the body etc. 

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @Anonymous   It could be related to the order of operations in your formulas.

    Specifically, the email is being sent before the patch operation is fully completed, and the most recent comment isn't included in the email.
    To resolve this issue, you can try to use the "OnSuccess" property of the form to send the email after the patch operation is completed. This could make sure that the email is sent only after the SharePoint list is updated.
    Here's how you can modify your formulas:

     

    1. First, move the patch formula to the "OnSelect" property of the button:

     

    Patch('SP List Name', varFormData, 'Clarification Email Form'.Updates);
    

     

     

    2. Next, move the email sending formula to the "OnSuccess" property of the form:

     

    Office365Outlook.SendEmailV2(
     'Clarification ComboBox TO'.Selected.Email,
     "Re: " & DataCardValue35_1.Text,
     ClarificationRichTextComments.HtmlText & "<br><br>" & DataCardValue28.Text & "<br><br>" & DataCardValue39.HtmlText & "<br><br>" & 'DAS Email Deep Link Html_1'.HtmlText,
     {Cc: 'Clarification ComboBox CC'.Selected.Email}
    );
    

     

    3. Finally, move the navigation and notification formula to the "OnSuccess" property of the form, after the email sending formula:

     

    If(
     IsEmpty(Errors('SP List Name')),
     Notify(
     "This task has been updated successfully",
     NotificationType.Success
     )
    );
    Navigate('Screen 1');
    

     

     

    See if it helps @Anonymous 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @poweractivate  I tried the format noted above.  The patch works fine, but when I moved the code to the OnSuccess it doesn't send the email.  I have found in the past that the OnSuccess would only function under a submit form.  I was able to find a work around in which as part of my email I not only included the appended comments, but also the comments that are entered into the Rich Text Editor.  That ensures that everything is captured.  Thanks for the help.

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 429 Most Valuable Professional

#2
11manish Profile Picture

11manish 191 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 122 Super User 2026 Season 2

Last 30 days Overall leaderboard