cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

PowerApps Save "Edit Form" and Email someone the saved changes

Hello,

I am trying to figure out how to use a check box on my edit form in PowerApps to save the changes someone makes in the form, but then turn around and draft an email with certain fields in it in the body of the email.

 

 

I put the following code in the "On Select" Action for a Icon I have placed in the top corner of my edit form.

 

 

SubmitForm(EditForm);

 

Office365.SendEmail("emailaddress@yahoo.com","New Success Story Uploaded",Concat(Table1,How_x0020_Rockwell_x0020_Won & Char(10)));

 

Navigate(DetailScreen,ScreenTransition.Cover)

 

My problem, I only want to email out the changes that occurred on this specific record, NOT the entire tables worth of records.

 

How do I alter this code so that when I make changes to my form, it will render those changes to my sheet, and then email out just the record that was changed in an email?

 

See attached screenshot of the app - very simple.

 

Thank you so much for your help!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Solution Sage
Solution Sage

Re: PowerApps Save "Edit Form" and Email someone the saved changes

The datacards have controls on them, too. (In fact, you can add multiple controls to the same data card... I do that to roll up data into a different/cleaner way of presenting it). Typically they have default names like "DataCard1Value". Click directly on the control, making sure you get it and not the DataCard, or expand the datacard in the object list at the left and see the controls that are within it.

View solution in original post

6 REPLIES 6
Highlighted
Solution Sage
Solution Sage

Re: PowerApps Save "Edit Form" and Email someone the saved changes

You can reference the controls from the form. It looks like Concat() is only getting you the one field, so if you want that field, just snag it before you submit.

UpdateContext({theEmailBody: HowRockwellWonControlName.Text});
SubmitForm(EditForm);
Office365.SendEmail("emailaddress@yahoo.com","New Success Story Uploaded", theEmailBody);
Navigate(DetailScreen,ScreenTransition.Cover)

 

Highlighted
Regular Visitor

Re: PowerApps Save "Edit Form" and Email someone the saved changes

Tim thanks for the quick reply!

 

I was actually going to add a few more fields in there.

 

I am not entirely sure what you mean by using the control name, where is that located?

 

 

Sorry for the beginner questions - new to PowerApps but have been learning rapidly from videos.

 

Thank you again!

Highlighted
Solution Sage
Solution Sage

Re: PowerApps Save "Edit Form" and Email someone the saved changes

Your control is the component containing the data... like your textbox, or your combobox, etc. In this case, it looks like a textbox. You can find the name in the object list at the left, or in the properties pane on the right (at the top). You can also change these, and that's generally good practice (you don't want to get 20 screens deep into an app and wonder what TextBox4_13 refers to.

 

If you want to put multiple fields together, use the ampersand to concatenate:

 

UpdateContext({theEmailBody: "This is to inform you that " & firstNameControl.Text & " " & lastNameControl.Text & " is going to need another " & thatOneField.Text & "."})

 

Post back if you need more help.

Highlighted
Regular Visitor

Re: PowerApps Save "Edit Form" and Email someone the saved changes

Tim thanks,

I was able to get that to work for the ones that were a text box no problem.  In this edit form, the fields are actually Data Cards...

 

How does that work with a data card?  

Highlighted
Solution Sage
Solution Sage

Re: PowerApps Save "Edit Form" and Email someone the saved changes

The datacards have controls on them, too. (In fact, you can add multiple controls to the same data card... I do that to roll up data into a different/cleaner way of presenting it). Typically they have default names like "DataCard1Value". Click directly on the control, making sure you get it and not the DataCard, or expand the datacard in the object list at the left and see the controls that are within it.

View solution in original post

Highlighted
Regular Visitor

Re: PowerApps Save "Edit Form" and Email someone the saved changes

Tim,

Thanks, for some reason I didn't tie 2 and 2 together that the card had an item in it that i could call from the code.

 

I got it working now, thank you for the help!

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (8,880)