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 / Missing body of email,...
Power Apps
Unanswered

Missing body of email, kind of

(0) ShareShare
ReportReport
Posted on by 725

Hi everyone, thanks to your previous help I have put together an app that sends a purchase list from a spreadsheet data source by email and also saves that order to another sheet in the same workbook. Which was initially working well. I had one button to send the email and another to save to my data source. However when I incorporated the two functions into the same button, it sometimes does not work properly every time. It would send the email with subject and my signature but not the actual list, nor would it be saved to my data source.

Could I be asking it to do to much at once?

Data source OneDrive Excel

Categories:
I have the same question (0)
  • mdevaney Profile Picture
    29,991 Moderator on at

    @Corissandageri 
    Please supply the code you put in one button.  This will hold the answer to your issue.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Corissandageri  Congratulations for being able to come so far with your project. Could you please attach a picture of the formula that you are using on the button that sends an email and saves the order? Thanks!

  • R Bakker Profile Picture
    725 on at

    I separated them this morning, so that's why I have two screen shots.

    Screenshot 2020-06-09 12.35.54.png
    Screenshot 2020-06-09 12.31.09.png
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at
    If you were patching before sending the email, then a lot of the stuff is getting reset so the email would leave those as empty.

    When you put the two button formulas together, put the email before forAll(patch...)).

    Also if you could attach a picture with two formulas together that would also be helpful!
  • R Bakker Profile Picture
    725 on at

    Sorry, not a picture, but this is how I had it when it was all on the one button.

    Gmail.SendEmailV2(Dropdown_EmailCustom.Selected.Result, {Subject:"Order fom OP Columbia, P.O "& OrderNumberCustom,Body:"Hello "& Char(32)& Dropdown2Custom.Selected.Result & "<br/>"& CanIPleaseCustom & "<br/>" & Concat(Purchaselist1,"Qty: " & Dropdown3.Selected.Result &" Code: " & Label6 & " Description: " & Label8 &"<br/>") &"<br/>"& Notes1Custom & "<br/>"& "<br/>"& "Kind regards"& "<br/>"& "Ron Bakker" & "<br/>"&"<br/>"& "PRODUCTION SUPPORT COORDINATOR" & "<br/>"& "O P Columbia" & "<br/>"& "271 South Highway"& "<br/>"& "Whitianga 3510"& "<br/>"& "Phone: 07 866 2486"& "<br/>"& "Mob: xxxx xxx xx" });ForAll(Purchaselist1,Patch(Table4,Defaults(Table4),{SupplierO:Supplier,CodeO:Code,Description02O:Description02, QuantityO: Dropdown3.Selected.Result,DateOrderedO:Today(), OrderNumO:GalleryOrderN2.Text, ProductNotesO:Notes1Custom.Text}));Reset(ComboBox2);Reset(Dropdown_EmailCustom);Reset(Dropdown2Custom);Reset(Dropdown_SupCustom);Reset(CanIPleaseCustom);Reset(Notes1Custom)
  • R Bakker Profile Picture
    725 on at

    Here is what it looks like when it works properly. When it goes wrong, the actual list is absent in the email but everything else in the email is fine.

     

    Screenshot 2020-06-10 06.09.00.png
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at
    Can you attach a picture of the email without the list please?
  • R Bakker Profile Picture
    725 on at
    Screenshot 2020-06-11 05.55.16.png
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Corissandageri  Let's try saving the list inside a variable and then use that variable in the email body.

     

    Set(ListDetails, Concat(Purchaselist1,"Qty: " & Dropdown3.Selected.Result &" Code: " & Label6 & " Description: " & Label8 &"<br/>"));
    
    Gmail.SendEmailV2(Dropdown_EmailCustom.Selected.Result, {Subject:"Order fom OP Columbia, P.O "& OrderNumberCustom,Body:"Hello "& Char(32)& Dropdown2Custom.Selected.Result & "<br/>"& CanIPleaseCustom & "<br/>" & ListDetails &"<br/>"& Notes1Custom & "<br/>"& "<br/>"& "Kind regards"& "<br/>"& "Ron Bakker" & "<br/>"&"<br/>"& "PRODUCTION SUPPORT COORDINATOR" & "<br/>"& "O P Columbia" & "<br/>"& "271 South Highway"& "<br/>"& "Whitianga 3510"& "<br/>"& "Phone: 07 866 2486"& "<br/>"& "Mob: xxxx xxx xx" });
    
    ForAll(Purchaselist1,Patch(Table4,Defaults(Table4),{SupplierO:Supplier,CodeO:Code,Description02O:Description02, QuantityO: Dropdown3.Selected.Result,DateOrderedO:Today(), OrderNumO:GalleryOrderN2.Text, ProductNotesO:Notes1Custom.Text}));
    
    Reset(ComboBox2);
    Reset(Dropdown_EmailCustom);
    Reset(Dropdown2Custom);
    Reset(Dropdown_SupCustom);
    Reset(CanIPleaseCustom);
    Reset(Notes1Custom)

     

     

    Gmail.SendEmailV2(Dropdown_EmailCustom.Selected.Result, {Subject:"Order fom OP Columbia, P.O "& OrderNumberCustom,Body:"Hello "& Char(32)& Dropdown2Custom.Selected.Result & "<br/>"& CanIPleaseCustom & "<br/>" & Concat(Purchaselist1,"Qty: " & Dropdown3.Selected.Result &" Code: " & Label6 & " Description: " & Label8 &"<br/>") &"<br/>"& Notes1Custom & "<br/>"& "<br/>"& "Kind regards"& "<br/>"& "Ron Bakker" & "<br/>"&"<br/>"& "PRODUCTION SUPPORT COORDINATOR" & "<br/>"& "O P Columbia" & "<br/>"& "271 South Highway"& "<br/>"& "Whitianga 3510"& "<br/>"& "Phone: 07 866 2486"& "<br/>"& "Mob: xxxx xxx xx" }); Select(Button4);

     

  • R Bakker Profile Picture
    725 on at

    Thank you I will try this next week.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 534

#2
WarrenBelz Profile Picture

WarrenBelz 416 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 306

Last 30 days Overall leaderboard