Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

Hiding Fields with no data in an email report

Hello, I previously posted about sending an email when a record is updated, and it is working well; however, I would like to have the end email "hide" any entries in the SharePoint List that are Blank (This gets sent company wide and I don't want all the unused fields shown). Thank you for your help and time! Here is the code, and an output image.


Back(); Set(newRecord, EditForm1.LastSubmit);
	"Update for Lot",
	"Lot #: "& newRecord.'Lot #'& Char(10)&
	"MBR #: "& newRecord.'MBR Number' & Char(10)&
	"Formulation WO: "& newRecord.'Formulation WO'& Char(10)&
	"Filling WO: "& newRecord.'Filling WO'& Char(10)&
	"Buffer Start: "& newRecord.'Buffer Start'& Char(10)&
	"Buffer End: "& newRecord.'Buffer End'& Char(10)&
	"Thaw/Equilibration Start: "& newRecord.'Thaw Start'& Char(10)&
	"Thaw/Equilibration End: "& newRecord.'Thaw End'& Char(10)&
	"WFI Addition Start: "& newRecord.'WFI Addition Start'& Char(10)&
	"WFI Addition End: "& newRecord.'WFI Addition End'& Char(10)&
	"Formulation Start: "& newRecord.'Formulation Start'& Char(10)&
	"Formulation End: "& newRecord.'Formulation End'& Char(10)&
	"API Addition Start: "& newRecord.'API Addition Start'& Char(10)&
	"API Addition End: "& newRecord.'API Addition End'& Char(10)&
	"Pooling Start: "& newRecord.'Pooling Start'& Char(10)&
	"Pooling End: "& newRecord.'Pooling End'& Char(10)&
	"Dilution Start: "& newRecord.'Dilution Start'& Char(10)&
	"Dilution End: " & newRecord.'Dilution End'& Char(10)&
	"BBR Filtration Start: "& newRecord.'BBR Filtration Start'& Char(10)&
	"BBR Filtration End: "& newRecord.'BBR Filtration End'& Char(10)&
	"Sterile Filtration Start: "& newRecord.'Sterile Filtration Start'& Char(10)&
	"Sterile Filtration End: "& newRecord.'Sterile Filtration End'& Char(10)&
	"Filling Start: "& newRecord.'Filling Start'& Char(10)&
	"Filling End: "& newRecord.'Filling End'& Char(10)&
	"Lyo Unload Start: "& newRecord.'Lyo Unload Start'& Char(10)&
	"Lyo Unload End: "& newRecord.'Lyo Unload End'& Char(10)&
	"1C Test Result: "& newRecord.'1C' & " "& newRecord.'1C Unit' & Char(10)&
	"2C Test Result: "& newRecord.'2C' & " "& newRecord.'2C Unit' & Char(10)&
	"3C Test Result: "& newRecord.'3C' & " "& newRecord.'3C Unit' & Char(10)&
	"4C Test Result: "& newRecord.'4C' & " "& newRecord.'4C Unit' & Char(10)&
	"5C Test Result: "& newRecord.'5C' & " "& newRecord.'5C Unit' & Char(10)&
	"6C Test Result: "& newRecord.'6C' & " "& newRecord.'6C Unit' & Char(10)&
	"1M Test Result: "& newRecord.'1M ' & " "& newRecord.'1M Unit' & Char(10)&
	"Endotoxin Test Result: "& newRecord.'Endotoxin Test Result' & Char(10)&
	"pH Test Result: "& newRecord.'pH Test Result' & Char(10)&
	"Pooled Weight: "& newRecord.'Pooled Weight' & "kg" & Char(10)&
	"BBR Filtered Weight: "& newRecord.'BBR Weight' & "kg" & Char(10)&
	"Steriel Filtered Weight: "& newRecord.'Sterile Weight' & "kg" & Char(10)&
	"Theoretical Yield: "& newRecord.'Theoretical Yield' & " Units" & Char(10)




Email Ex.JPG


Accepted Solutions

Saw your posts.  Did my idea work for you? 

View solution in original post

Super User III
Super User III


Great question!


You can take this line...

"Lot #: "& newRecord.'Lot #'& Char(10)&


...and change it to this code to show nothing when the value for Lot is blank.

If(!IsBlank(newRecord.'Lot #'), "Lot #: "& newRecord.'Lot #'& Char(10))&


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

Is there an additional True/False Statement needed for this? I'm getting an error

NVM, forgot the additional ) 

Saw your posts.  Did my idea work for you? 

View solution in original post

Helpful resources

PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,857)