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."

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,217)