cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Jvang
Helper V
Helper V

Email with updated Columns content

Hello,

 

I was wondering if I am able to add which column that was updated in the email text box. If so, how would I go about it. I have over 200 plus columns for inventory.

Also, does it matter if I use Self.LastSubmit.Partnumber or EditForm1.LastSubmit.Partnumber or doesn't matter?

This is what I got so far and I thought it be better to see which columns they have updated for reference if it was updated by mistake.

Office365Outlook.SendEmailV2("test@email.com","Updated Item: " & Self.LastSubmit.PartNumber, 
    
"An item has been updated. See the following infomation:" & 
"<br>"
& "<b>PartNumber: </b>" & EditForm1.LastSubmit.PartNumber & 
"<br>"
& "<b>TotalQTY: </b>" & Self.LastSubmit.TotalBinLo & 
"<br>"
& "<b>DateModified: </b>" & Self.LastSubmit.DateModified & 
"<br>"
& "<b>From: PowerApps</b>"
);

 

Thanks,

 

Jvang

test.PNGtest2.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@Jvang 

Your formula can be shortened to the following:

With(Self.LastSubmit,
    Office365Outlook.SendEmailV2("test@email.com","Updated Item: " & PartNumber, 
        "An item has been updated. See the following infomation: <br>
         <b>PartNumber: </b>" & PartNumber & "<br>
         <b>TotalQTY: </b>" & TotalBinLo & "<br>      
         <b>DateModified: </b>" & DateModified & "<br>
         <b>From: PowerApps</b>"
    )
)

 

Using Self, is much easier when you are in a control.  IN this case, you are expected to be in a property of the control which is the form.  I assume this is an OnSuccess action formula.

So, using Self refers to the current control - the form.  If you are in a property in another for, then referring to Self would refer to that other control...not the form.  In that case, you would need to specify the form control name.

 

Since you are still storing your data in a single record (for the part) with all of the columns for the inventory in it (as opposed to a more database-like way), you will be faced with putting all of your columns in by hand.  

Determining which value has changed will not be apparent.  PowerApps does not only keep track of what was updated, but the entire record in the last submit.

 

So, you will need to either gather what is being changed during the form entry, or prior to submit.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

2 REPLIES 2
RandyHayes
Super User
Super User

@Jvang 

Your formula can be shortened to the following:

With(Self.LastSubmit,
    Office365Outlook.SendEmailV2("test@email.com","Updated Item: " & PartNumber, 
        "An item has been updated. See the following infomation: <br>
         <b>PartNumber: </b>" & PartNumber & "<br>
         <b>TotalQTY: </b>" & TotalBinLo & "<br>      
         <b>DateModified: </b>" & DateModified & "<br>
         <b>From: PowerApps</b>"
    )
)

 

Using Self, is much easier when you are in a control.  IN this case, you are expected to be in a property of the control which is the form.  I assume this is an OnSuccess action formula.

So, using Self refers to the current control - the form.  If you are in a property in another for, then referring to Self would refer to that other control...not the form.  In that case, you would need to specify the form control name.

 

Since you are still storing your data in a single record (for the part) with all of the columns for the inventory in it (as opposed to a more database-like way), you will be faced with putting all of your columns in by hand.  

Determining which value has changed will not be apparent.  PowerApps does not only keep track of what was updated, but the entire record in the last submit.

 

So, you will need to either gather what is being changed during the form entry, or prior to submit.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes,

 

Yes, this is a OnSuccess formula.

Yeah, that's what I figured after submitting the question on adding the columns.

 

Thank you,

 

Jvang

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (2,649)