cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
crjwarre
Helper I
Helper I

Adding a Report from another List to an Email

Hello! Thanks to @mdevaney , I have a form that sends an email to the user when new information is added. This works beautifully, but I am wondering if it would be possible to also add a Report from another List where Lot # = Lot # and then pull the information from that list into the same email. Thank you for your time!!

 

Back(); Set(newRecord, EditForm1.LastSubmit);
Office365Outlook.SendEmail(
	User().Email,
	"Update for Lot# " & newRecord.'Lot #' & "  MBR#" & newRecord.'MBR Number',
	
	"<b>Lot #: </b>"& newRecord.'Lot #'& "<p>" &
	"<b>MBR #: </b>"& newRecord.'MBR Number' & "<p>"&
If(!IsBlank(newRecord.'SKU3 Filled'), "<b>SKU3 Filled: </b>"& newRecord.'SKU3 Filled' & "Units" & "<p>")
, 
    
    {IsHtml: true, Importance: "Normal"}

);

 

13 REPLIES 13

 

Hi, I think I'm having some conceptual issues with the formula, and I wanted to make sure my understanding was correct:

Formula: Set(In-Process Issues, LookUp(In-Process Issues, 'Lot #' = newrecord.'Lot #'))

So the Set() function is identifying the list to get the information from, and then the LookUp specifies the List again, and then is supposed to match where the entries are equal across the lists) I am getting an error in my code thus far.

My other question is where would a function such as this pull the information from a column in the List In-Process issues called Event Description. 

 

To put it in terms I am more familiar with, I want to perform (if it were a SQL Table) a Union WHERE Lot Number is the newRecord and pull any entries in Event Description column

 

@mdevaney 

Hi, I think I'm having some conceptual issues with the formula, and I wanted to make sure my understanding was correct:

Formula: Set(In-Process Issues, LookUp(In-Process Issues, 'Lot #' = newrecord.'Lot #'))

So the Set() function is identifying the list to get the information from, and then the LookUp specifies the List again, and then is supposed to match where the entries are equal across the lists) I am getting an error in my code thus far.

My other question is where would a function such as this pull the information from a column in the List In-Process issues called Event Description. 

 

To put it in terms I am more familiar with, I want to perform (if it were a SQL Table) a Union WHERE Lot Number is the newRecord and pull any entries in Event Description column

 

@mdevaney 

 

@mdevaney 

 

Hi, I think I'm having some conceptual issues with the formula, and I wanted to make sure my understanding was correct:

Formula: 

 

Set(In-Process Issues, LookUp(In-Process Issues, 'Lot #' = newrecord.'Lot #'))

 

 

So the Set() function is identifying the list to get the information from, and then the Look Up specifies the List again, and then is supposed to match where the entries are equal across the lists) I am getting an error in my code thus far.

My other question is where would a function such as this pull the information from a column in the List In-Process issues called Event Description. 

 

To put it in terms I am more familiar with, I want to perform (if it were a SQL Table) a Union WHERE Lot Number is the new Record and pull any entries in Event Description column

@crjwarre 
Actually, SET is storing the record from the list 'In-Process Issues' in a variable.  We should change the variable name to something else like this.

 

Set(varOtherRecord, LookUp(In-Process Issues, 'Lot #' = newrecord.'Lot #'))

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (1,739)